]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
alignof() should operate on a type-id
authorMatthew Barr <matthew.barr@intel.com>
Mon, 11 Jan 2016 03:28:27 +0000 (14:28 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Tue, 1 Mar 2016 00:23:48 +0000 (11:23 +1100)
src/rose/rose_build_bytecode.cpp

index b0c251f4d0f5fd38b9567cfa3221b82ec6f0c3b8..5f6541919cb2cfc67f20ff74baf4987c90503ecc 100644 (file)
@@ -327,14 +327,14 @@ template<typename T>
 static
 u32 add_to_engine_blob(build_context &bc, const T &a) {
     static_assert(is_pod<T>::value, "should be pod");
-    return add_to_engine_blob(bc, &a, sizeof(a), alignof(a));
+    return add_to_engine_blob(bc, &a, sizeof(a), alignof(T));
 }
 
 template<typename T>
 static
 u32 add_to_engine_blob(build_context &bc, const T &a, const size_t len) {
     static_assert(is_pod<T>::value, "should be pod");
-    return add_to_engine_blob(bc, &a, len, alignof(a));
+    return add_to_engine_blob(bc, &a, len, alignof(T));
 }
 
 template<typename Iter>