aboutsummaryrefslogtreecommitdiff
path: root/src/hex_functions.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2020-05-22 01:18:24 +0300
committerCrystalwarrior <varsash@gmail.com>2020-05-22 01:18:24 +0300
commitc8e12558cdd3fd0769b81679ad09edf1f29b780f (patch)
tree7dae2225e574c3ee55d6b82a1d2f399db4ace5c0 /src/hex_functions.cpp
parentdfac0652c8eb9bd48ceea7ae755e9c2f7e5cb1a2 (diff)
Clang-ify the code with this styling using Visual Studio Code:
{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Stroustrup, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All } (this is the Visual Studio preset with only "BreakBeforeBraces" changed from Allman to Stroustrup)
Diffstat (limited to 'src/hex_functions.cpp')
-rw-r--r--src/hex_functions.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/hex_functions.cpp b/src/hex_functions.cpp
index 4a58d2b..63293c1 100644
--- a/src/hex_functions.cpp
+++ b/src/hex_functions.cpp
@@ -1,18 +1,17 @@
#include "hex_functions.h"
-namespace omni
-{
- std::string int_to_hex(unsigned int input)
- {
- if (input > 255)
- return "FF";
+namespace omni {
+ 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