aboutsummaryrefslogtreecommitdiff
path: root/src/hex_functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hex_functions.cpp')
-rw-r--r--src/hex_functions.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/hex_functions.cpp b/src/hex_functions.cpp
index 1e35718f..4a58d2b4 100644
--- a/src/hex_functions.cpp
+++ b/src/hex_functions.cpp
@@ -1,17 +1,18 @@
#include "hex_functions.h"
-namespace omni {
-std::string int_to_hex(unsigned int input)
+namespace omni
{
- if (input > 255)
- return "FF";
+ std::string int_to_hex(unsigned int input)
+ {
+ if (input > 255)
+ return "FF";
- std::stringstream stream;
- stream << std::setfill('0') << std::setw(sizeof(char) * 2) << std::hex
- << input;
- std::string result(stream.str());
- std::transform(result.begin(), result.end(), result.begin(), ::toupper);
+ std::stringstream stream;
+ stream << std::setfill('0') << std::setw(sizeof(char)*2)
+ << std::hex << input;
+ std::string result(stream.str());
+ std::transform(result.begin(), result.end(), result.begin(), ::toupper);
- return result;
+ return result;
+ }
}
-} // namespace omni