Fix Hopper selection crash, add some placeholder enums, add a compaitiblity shim

This commit is contained in:
2022-10-04 23:36:59 -04:00
parent 8ef3bcd352
commit 3b83e527f8
6 changed files with 69 additions and 6 deletions

11
src/include/ToolEnum.h Normal file
View File

@@ -0,0 +1,11 @@
#pragma once
namespace Enum
{
namespace Hopper
{
enum Value {
GameTool = 0, Grab = 1, Clone = 2, Hammer = 3, Slingshot = 4, Rocket = 5, Laser = 6
};
}
}

View File

@@ -0,0 +1,26 @@
#ifndef COMPAT_SHIM
#define COMPAT_SHIM
#include <sstream>
#include <string>
template<class T>
std::string toString(const T &value)
{
std::ostringstream os;
os << value;
return os.str();
}
namespace std
{
std::string to_string( int value ) {return toString(value);}
std::string to_string( long value ) {return toString(value);}
std::string to_string( long long value ) {return toString(value);}
std::string to_string( unsigned value ) {return toString(value);}
std::string to_string( unsigned long value ) {return toString(value);}
std::string to_string( unsigned long long value ) {return toString(value);}
std::string to_string( float value ) {return toString(value);}
std::string to_string( double value ) {return toString(value);}
std::string to_string( long double value ) {return toString(value);}
}
#endif