Skip to content

Commit

Permalink
Fix alignas error in clang
Browse files Browse the repository at this point in the history
  • Loading branch information
SAPikachu committed Apr 13, 2014
1 parent 723ebaa commit d18e781
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/compiler_compat.h
Expand Up @@ -52,7 +52,7 @@ static inline void* _aligned_malloc(size_t size, size_t alignment)
#endif

#if !defined(HAVE_ALIGNAS) && (defined(_MSC_VER) || defined(__INTEL_COMPILER))
#define ALIGNED_ARRAY(decl, alignment) alignas(alignment) decl
#define ALIGNED_ARRAY(type, decl, alignment) type alignas(alignment) decl
#else
#define ALIGNED_ARRAY(decl, alignment) decl alignas(alignment)
#endif
#define ALIGNED_ARRAY(type, decl, alignment) alignas(alignment) type decl
#endif
4 changes: 2 additions & 2 deletions src/pixel_proc_c_high_ordered_dithering.h
Expand Up @@ -4,7 +4,7 @@ namespace pixel_proc_high_ordered_dithering {

// bayer dither matrix
// align to 16 byte for reading from SSE code
static const unsigned char ALIGNED_ARRAY(THRESHOLD_MAP [16] [16], 16) =
ALIGNED_ARRAY(static const unsigned char, THRESHOLD_MAP [16] [16], 16) =
{
{ 0, 128, 32, 160, 8, 136, 40, 168, 2, 130, 34, 162, 10, 138, 42, 170 },
{ 192, 64, 224, 96, 200, 72, 232, 104, 194, 66, 226, 98, 202, 74, 234, 106 },
Expand Down Expand Up @@ -55,4 +55,4 @@ namespace pixel_proc_high_ordered_dithering {
}

#include "pixel_proc_c_high_bit_depth_common.h"
};
};

0 comments on commit d18e781

Please sign in to comment.