index
:
cheats.git
Some ancient cheats I don't use anymore.
log msg
author
committer
range
master
summary
refs
log
tree
commit
diff
path:
root
/
aoe2hd
/
src
/
utils.cpp
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
author
Toni Uhlig <matzeton@googlemail.com>
2018-07-02 01:06:39 +0200
committer
Toni Uhlig <matzeton@googlemail.com>
2018-07-02 03:08:59 +0200
commit
c2a2445897af17adb56a32dcf111312763a575d4
(
patch
)
tree
ad459cdd682aff3a011d11b6f2a3c518c60dec6a
/
aoe2hd/src/utils.cpp
initial commit
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat
(limited to 'aoe2hd/src/utils.cpp')
-rwxr-xr-x
aoe2hd/src/utils.cpp
19
1 files changed, 19 insertions, 0 deletions
diff --git a/aoe2hd/src/utils.cpp b/aoe2hd/src/utils.cpp
new file mode 100755
index 0000000..7639ab7
--- /dev/null
+++ b/
aoe2hd/src/utils.cpp
@@ -0,0 +1,19 @@
+#include "utils.h"
+
+#include <sstream>
+#include <iomanip>
+
+
+namespace utils
+{
+std::string convertBinToHexstr(const std::vector<unsigned char>& bin)
+{
+ std::stringstream buffer;
+ for (auto byte : bin)
+ {
+ buffer << std::hex << std::setfill('0');
+ buffer << std::setw(2) << static_cast<unsigned>(byte);
+ }
+ return buffer.str();
+}
+}