diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2018-07-05 21:26:05 -0500 |
|---|---|---|
| committer | oldmud0 <oldmud0@users.noreply.github.com> | 2018-07-05 21:26:05 -0500 |
| commit | e36dae20b7d1baba912c55ec55b82a380c4973da (patch) | |
| tree | 966576af1c8e0739ec86f13936fdc9163b2953d1 | |
| parent | bb0b767ba40d189b97ffe371ab063c5380609b0c (diff) | |
Fix hex_functions compile errors
| -rw-r--r-- | hex_functions.cpp | 4 | ||||
| -rw-r--r-- | hex_functions.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/hex_functions.cpp b/hex_functions.cpp index e07a7b08..683097ee 100644 --- a/hex_functions.cpp +++ b/hex_functions.cpp @@ -57,10 +57,10 @@ namespace omni return "FF"; std::stringstream stream; - stream << std::setfill ('0') << std::setw(sizeof(char)*2) + stream << std::setfill('0') << std::setw(sizeof(char)*2) << std::hex << input; std::string result(stream.str()); - std::transform(str.begin(), str.end(), str.begin(), ::toupper); + std::transform(result.begin(), result.end(), result.begin(), ::toupper); return result; } diff --git a/hex_functions.h b/hex_functions.h index 9f7a1e75..1f22339c 100644 --- a/hex_functions.h +++ b/hex_functions.h @@ -6,6 +6,8 @@ #include <iostream> #include <algorithm> #include <string> +#include <iomanip> +#include <sstream> namespace omni { |
