don't use certain STL functions

some functions defined in <cmath>, as well as std::to_string aren't available on GNU's STL for some platforms, e.g. Android
This commit is contained in:
Konstantin Käfer
2015-08-03 15:01:35 +02:00
parent ab7456075c
commit 78ec33320f
34 changed files with 69 additions and 51 deletions

View File

@@ -116,7 +116,7 @@ const size_t namedColorCount = sizeof (namedColors) / sizeof (NamedColor);
template <typename T>
uint8_t clamp_css_byte(T i) { // Clamp to integer 0 .. 255.
i = std::round(i); // Seems to be what Chrome does (vs truncation).
i = ::round(i); // Seems to be what Chrome does (vs truncation).
return i < 0 ? 0 : i > 255 ? 255 : i;
}