Skip to content

Commit

Permalink
use parens for right shift in template
Browse files Browse the repository at this point in the history
without them, it's illegal in c++11 :(
  • Loading branch information
aswaterman committed Dec 4, 2012
1 parent 14a2dfa commit 2387c2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion csrc/emulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ typedef uint32_t half_val_t;
#define CLAMP(a, min, max) MAX(MIN(a, max), min)

template<uint32_t x, uint32_t shifted=0, bool sticky=false> struct CeilLog {
static uint32_t const v = CeilLog< x >> 1, shifted + 1, sticky | (x & 1)>::v;
static uint32_t const v = CeilLog<(x >> 1), shifted + 1, sticky | (x & 1)>::v;
};

template<uint32_t shifted, bool sticky> struct CeilLog<0, shifted, sticky> {
Expand Down

0 comments on commit 2387c2d

Please sign in to comment.