Fix Hopper selection crash, add some placeholder enums, add a compaitiblity shim
This commit is contained in:
11
src/include/ToolEnum.h
Normal file
11
src/include/ToolEnum.h
Normal 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
|
||||
};
|
||||
}
|
||||
}
|
||||
26
src/include/VS2005CompatShim.h
Normal file
26
src/include/VS2005CompatShim.h
Normal 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
|
||||
Reference in New Issue
Block a user