Review fixes.

This commit is contained in:
Maxim Pimenov 2018-04-17 12:47:04 +03:00 committed by Tatiana Yan
parent 9bfff1ff82
commit f9f9ee72e9
2 changed files with 11 additions and 6 deletions

View file

@ -3,20 +3,24 @@
#include "base/bits.hpp"
#include "base/checked_cast.hpp"
#include <cstdint>
#include <cstdlib>
#include <vector>
namespace
{
template <typename T> uint32_t PopCountSimple(T x)
template <typename T>
uint32_t PopCountSimple(T x)
{
uint32_t res = 0;
for (; x != 0; x >>= 1)
{
uint32_t res = 0;
for (; x != 0; x >>= 1)
if (x & 1)
++res;
return res;
if (x & 1)
++res;
}
return res;
}
} // namespace
UNIT_TEST(Popcount32)
{

View file

@ -6,6 +6,7 @@
#include "base/assert.hpp"
#include <cstdint>
#include <utility>
using RectId = m2::CellId<19>;