fix some warnings

This commit is contained in:
arvidn
2015-08-21 10:05:51 +02:00
parent 589888fd9f
commit b7b0dafcca
4 changed files with 9 additions and 1 deletions

View File

@@ -74,7 +74,7 @@ std::string add_suffix(float val, char const* suffix)
std::string color(std::string const& s, color_code c)
{
if (c == col_none) return s;
if (std::count(s.begin(), s.end(), ' ') == s.size()) return s;
if (std::count(s.begin(), s.end(), ' ') == int(s.size())) return s;
char buf[1024];
snprintf(buf, sizeof(buf), "\x1b[3%dm%s\x1b[39m", c, s.c_str());