]> granicus.if.org Git - libvpx/commitdiff
use a compile time constant for kDataAlignment
authorJohann <johannkoenig@google.com>
Wed, 23 Oct 2019 14:52:38 +0000 (10:52 -0400)
committerJohann <johannkoenig@google.com>
Wed, 23 Oct 2019 14:52:38 +0000 (10:52 -0400)
const or constexpr should be sufficient for this use but older
versions of gcc fail to expand DECLARE_ALIGNED correctly. Work
around this by using an enum.

Fixed: webm:1660
Change-Id: Ifa4f7585417760f90f9fb28332152019de9f8169

test/sad_test.cc

index 94cb325231ce9aed76292d8cbd0124ba0eefb1d8..e39775cc4628af549273e67e28cbb764d7f6f2e7 100644 (file)
@@ -116,7 +116,10 @@ class SADTestBase : public ::testing::TestWithParam<ParamType> {
 
  protected:
   // Handle blocks up to 4 blocks 64x64 with stride up to 128
-  static const int kDataAlignment = 32;
+  // crbug.com/webm/1660
+  // const[expr] should be sufficient for DECLARE_ALIGNED but early
+  // implementations of c++11 appear to have some issues with it.
+  enum { kDataAlignment = 32 };
   static const int kDataBlockSize = 64 * 128;
   static const int kDataBufferSize = 4 * kDataBlockSize;