diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2020-04-17 21:57:16 -0500 |
|---|---|---|
| committer | oldmud0 <oldmud0@users.noreply.github.com> | 2020-04-17 21:57:16 -0500 |
| commit | 13942345c6a3e7e1625c6c26cc2f2f368a3bff23 (patch) | |
| tree | 73ce940217b57fd47afb6a95e828e6309ed5e683 /src/hex_functions.cpp | |
| parent | faac191f0b9e99b82614ed3959ec5c67f56a1fc3 (diff) | |
Run clang-format on entire project
Indentation fixed to 2 spaces per tab. Braces set to Stroustrup style.
Lines reflow at 80 characters. One-line method bodies are on the same
line as the signature. Space always after `//`. No indentation
on preprocessor macros. Includes are sorted lexicographically.
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.cpp | 23 |
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 |
