aboutsummaryrefslogtreecommitdiff
path: root/src/hex_functions.cpp
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2020-05-22 17:13:17 -0500
committeroldmud0 <oldmud0@users.noreply.github.com>2020-05-22 17:13:37 -0500
commit8928aa2718378bc42d20d5bbe6c17be68d65d6f3 (patch)
treebf90d3e73519d58cc89e2135b613e308ac0a0ed8 /src/hex_functions.cpp
parent156a760ebab6839c53f9c613881f0937e814414a (diff)
Perform clang-format
If you don't want to see this commit on blames, use the hidden whitespace option on GitHub, or use `-w` in git-blame.
Diffstat (limited to 'src/hex_functions.cpp')
-rw-r--r--src/hex_functions.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/hex_functions.cpp b/src/hex_functions.cpp
index 4a58d2b4..1e35718f 100644
--- a/src/hex_functions.cpp
+++ b/src/hex_functions.cpp
@@ -1,18 +1,17 @@
#include "hex_functions.h"
-namespace omni
+namespace omni {
+std::string int_to_hex(unsigned int input)
{
- std::string int_to_hex(unsigned int input)
- {
- if (input > 255)
- return "FF";
+ 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