aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hex_functions.cpp4
-rw-r--r--hex_functions.h2
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
{