Merge branch 'beta' into mergemaster
# Conflicts: # src/main.cpp
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <errno.h>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
|
||||
using namespace std;
|
||||
@@ -46,6 +47,20 @@ string SanitizeFilename(const string& str)
|
||||
return strResult;
|
||||
}
|
||||
|
||||
std::string HexInt(uint32_t val)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << std::setfill('0') << std::setw(sizeof(uint32_t) * 2) << std::hex << val;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
uint32_t ParseHexToUInt32(const std::string& str) {
|
||||
std::istringstream converter(str);
|
||||
uint32_t value;
|
||||
converter >> std::hex >> value;
|
||||
return value;
|
||||
}
|
||||
|
||||
const signed char p_util_hexdigit[256] =
|
||||
{ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
|
||||
|
||||
Reference in New Issue
Block a user