diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2020-05-02 21:29:06 -0500 |
|---|---|---|
| committer | oldmud0 <oldmud0@users.noreply.github.com> | 2020-05-02 21:29:06 -0500 |
| commit | bbdad2a40d8f02fe738830d9cf66ad4ec2fa86cf (patch) | |
| tree | 8e8892d24684f005b0e18624677957791e1738b7 /src/hex_functions.cpp | |
| parent | 1e2d71fb96ca85fa50c172c2f1cf22b2620bacd2 (diff) | |
| parent | 992c0b14e155059a7e22ad72c0309b620c850a46 (diff) | |
Merge branch '2.7-rc'
Includes full code reformat.
# Conflicts:
# src/aomusicplayer.cpp
# src/path_functions.cpp
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 4a58d2b..1e35718 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 |
