From 95ddb89d07fcd3f2585e1036d6cb72a0d1b2039b Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Fri, 18 Oct 2019 19:12:36 -0400 Subject: [PATCH] Add inline to log2 --- include/math.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/math.hpp b/include/math.hpp index 69651816..516cfdb5 100644 --- a/include/math.hpp +++ b/include/math.hpp @@ -76,7 +76,7 @@ inline void eucDivMod(int a, int b, int* div, int* mod) { } /** Returns `floor(log_2(n))`, or 0 if `n == 1`. */ -int log2(int n) { +inline int log2(int n) { int i = 0; while (n >>= 1) { i++;