Skip to content
Snippets Groups Projects
Commit 99a87e48 authored by g0dil's avatar g0dil
Browse files

Utils/Console: Fix FlagCollection on 64bit hosts

parent 8fc96819
No related branches found
No related tags found
No related merge requests found
...@@ -87,8 +87,8 @@ format(type const & value, std::ostream & os) ...@@ -87,8 +87,8 @@ format(type const & value, std::ostream & os)
{ {
unsigned n (0); unsigned n (0);
std::stringstream ss; std::stringstream ss;
for (unsigned bit (0); bit<sizeof(value.value)*CHAR_BIT; ++bit) { unsigned long flag (1);
unsigned long flag (1<<bit); for (unsigned bit (0); bit<sizeof(value.value)*CHAR_BIT; ++bit, flag<<=1) {
if (value.value & flag) { if (value.value & flag) {
if (n++) ss << " "; if (n++) ss << " ";
senf::console::format(static_cast<Enum>(flag), ss); senf::console::format(static_cast<Enum>(flag), ss);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment