diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/chunk_generator.hh | 2 | ||||
-rw-r--r-- | base/intmath.hh | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/base/chunk_generator.hh b/base/chunk_generator.hh index afd577814..a584679d0 100644 --- a/base/chunk_generator.hh +++ b/base/chunk_generator.hh @@ -77,7 +77,7 @@ class ChunkGenerator : chunkSize(_chunkSize) { // chunkSize must be a power of two - assert(isPowerOf2(chunkSize)); + assert(chunkSize == 0 || isPowerOf2(chunkSize)); // set up initial chunk. curAddr = startAddr; diff --git a/base/intmath.hh b/base/intmath.hh index c8b9c5ec5..198278d6f 100644 --- a/base/intmath.hh +++ b/base/intmath.hh @@ -202,9 +202,9 @@ roundUp(T val, int align) template <class T> inline T -roundDown(T val, T align) +roundDown(T val, int align) { - T mask = align - 1; + T mask = (T)align - 1; return val & ~mask; } |