From 47b79954d24b6fa1cdacede5a4621c890063d94f Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Fri, 18 Oct 2019 17:44:18 -0400 Subject: [PATCH] Replace generic log2 with int. --- include/math.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/math.hpp b/include/math.hpp index c4025889..69651816 100644 --- a/include/math.hpp +++ b/include/math.hpp @@ -76,9 +76,8 @@ inline void eucDivMod(int a, int b, int* div, int* mod) { } /** Returns `floor(log_2(n))`, or 0 if `n == 1`. */ -template -T log2(T n) { - T i = 0; +int log2(int n) { + int i = 0; while (n >>= 1) { i++; }