- bugfix so code compiles on older gnuc
This commit is contained in:
parent
3401d5a43a
commit
100e39e6e0
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
#include "properties.h"
|
#include "properties.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
//#include <utility>
|
||||||
#include "game_constants.h"
|
#include "game_constants.h"
|
||||||
|
|
||||||
namespace Glest{ namespace Game{
|
namespace Glest{ namespace Game{
|
||||||
|
@ -36,11 +37,6 @@ enum ConfigType {
|
||||||
|
|
||||||
class Config {
|
class Config {
|
||||||
private:
|
private:
|
||||||
//Properties properties;
|
|
||||||
//ConfigType cfgType;
|
|
||||||
//string fileName;
|
|
||||||
//bool fileLoaded;
|
|
||||||
|
|
||||||
std::pair<Properties,Properties> properties;
|
std::pair<Properties,Properties> properties;
|
||||||
std::pair<ConfigType,ConfigType> cfgType;
|
std::pair<ConfigType,ConfigType> cfgType;
|
||||||
std::pair<string,string> fileName;
|
std::pair<string,string> fileName;
|
||||||
|
@ -54,9 +50,9 @@ private:
|
||||||
char translateStringToCharKey(const string &value) const;
|
char translateStringToCharKey(const string &value) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static Config &getInstance(std::pair<ConfigType,ConfigType> type = std::pair<ConfigType,ConfigType>(cfgMainGame,cfgUserGame),
|
static Config &getInstance(std::pair<ConfigType,ConfigType> type = std::make_pair(cfgMainGame,cfgUserGame) ,
|
||||||
std::pair<string,string> file = std::pair<string,string>("glest.ini","glestuser.ini"),
|
std::pair<string,string> file = std::make_pair("glest.ini","glestuser.ini") ,
|
||||||
std::pair<bool,bool> fileMustExist = std::pair<bool,bool>(true,false));
|
std::pair<bool,bool> fileMustExist = std::make_pair(true,false) );
|
||||||
void save(const string &path="");
|
void save(const string &path="");
|
||||||
|
|
||||||
int getInt(const string &key,const char *defaultValueIfNotFound=NULL) const;
|
int getInt(const string &key,const char *defaultValueIfNotFound=NULL) const;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user