]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
rose_build_engine_blob: add func for bytecode_ptr
authorJustin Viiret <justin.viiret@intel.com>
Mon, 20 Mar 2017 04:11:44 +0000 (15:11 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 26 Apr 2017 05:19:35 +0000 (15:19 +1000)
src/rose/rose_build_engine_blob.h

index 61b6b440100be99c9d5a81a74d118e7bbce99eeb..69e8201ec7a96ebf3c5a9608810c48b6237afa14 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "ue2common.h"
 #include "util/alloc.h"
+#include "util/bytecode_ptr.h"
 #include "util/container.h"
 #include "util/multibit_build.h"
 #include "util/noncopyable.h"
@@ -76,6 +77,11 @@ public:
         return verify_u32(rv);
     }
 
+    template<typename T>
+    u32 add(const bytecode_ptr<T> &a) {
+        return add(a.get(), a.size(), a.align());
+    }
+
     template<typename T>
     u32 add(const T &a) {
         static_assert(std::is_pod<T>::value, "should be pod");