Skip to content
Permalink
Browse files

Some types to eliminate warnings.

  • Loading branch information
emeryberger committed Mar 3, 2020
1 parent d9b7eb0 commit a80041cc15174ab82a39bae1cd750b52955c7eef
Showing with 3 additions and 3 deletions.
  1. +3 −3 utility/bins.h
@@ -70,11 +70,11 @@ namespace HL {

// constexpr integer log base two calculations, ONLY for use during compilation.

static constexpr inline unsigned long ilog2(const size_t n) {
static constexpr inline unsigned int ilog2(const size_t n) {
return ((n<=1) ? 0 : 1 + ilog2(n/2));
}

static constexpr inline unsigned long ilog2_ceil (const size_t n)
static constexpr inline auto ilog2_ceil (const size_t n)
{
return ilog2(n * 2 - 1);
}
@@ -91,7 +91,7 @@ namespace HL {
static inline constexpr int getSizeClass (size_t sz) {
// tprintf::tprintf("sz = @\n", sz);
sz = (sz < sizeof(max_align_t)) ? sizeof(max_align_t) : sz;
return (unsigned long) HL::ilog2(sz) - LogMaxAlignT; // (int) HL::ilog2(sizeof(max_align_t));
return (int) HL::ilog2(sz) - LogMaxAlignT; // (int) HL::ilog2(sizeof(max_align_t));
}

static constexpr inline size_t getClassSize(int i) {

0 comments on commit a80041c

Please sign in to comment.
You can’t perform that action at this time.