This commit is contained in:
gabime 2018-07-20 23:26:52 +03:00
parent 9cbdd5ffd4
commit b0059b290f
2 changed files with 25 additions and 24 deletions

View File

@ -51,14 +51,14 @@ inline void pad2(int n, fmt::basic_memory_buffer<char, Buffer_Size> &dest)
} }
if (n > 9) // 10-99 if (n > 9) // 10-99
{ {
dest.push_back('0' + (n / 10)); dest.push_back('0' + static_cast<char>(n / 10));
dest.push_back('0' + (n % 10)); dest.push_back('0' + static_cast<char>(n % 10));
return; return;
} }
if (n >= 0) // 0-9 if (n >= 0) // 0-9
{ {
dest.push_back('0'); dest.push_back('0');
dest.push_back('0' + n); dest.push_back('0' + static_cast<char>(n));
return; return;
} }
// negatives (unlikely, but just in case, let fmt deal with it) // negatives (unlikely, but just in case, let fmt deal with it)
@ -76,15 +76,15 @@ inline void pad3(int n, fmt::basic_memory_buffer<char, Buffer_Size> &dest)
if (n > 9) // 10-99 if (n > 9) // 10-99
{ {
dest.push_back('0'); dest.push_back('0');
dest.push_back('0' + n / 10); dest.push_back('0' + static_cast<char>(n / 10));
dest.push_back('0' + n % 10); dest.push_back('0' + static_cast<char>(n % 10));
return; return;
} }
if (n >= 0) if (n >= 0)
{ {
dest.push_back('0'); dest.push_back('0');
dest.push_back('0'); dest.push_back('0');
dest.push_back('0' + n); dest.push_back('0' + static_cast<char>(n));
return; return;
} }
// negatives (unlikely, but just in case let fmt deal with it) // negatives (unlikely, but just in case let fmt deal with it)

View File

@ -175,7 +175,9 @@ private:
void worker_loop_() void worker_loop_()
{ {
while (process_next_msg_()) {}; while (process_next_msg_())
{
};
} }
// process next message in the queue // process next message in the queue
@ -210,7 +212,6 @@ private:
return true; return true;
} }
} }
assert(false);
return true; // should not be reached return true; // should not be reached
} }
}; };