Commit b7414522 authored by Robert Scott James's avatar Robert Scott James

Fixed: the annoying warnings about const char * conversion

 Changes to be committed:
	modified:   src/configReader.cpp
	modified:   src/configReader.h
parent 31f4b42b
......@@ -18,7 +18,7 @@ int loadConfig(std::string file,Config *cfg){
}
}
int fromConfig(Config *cfg,char* addr,int def){
int fromConfig(Config *cfg,const char* addr,int def){
try{
return cfg->lookup(addr);
} catch(const SettingNotFoundException &nfex){
......@@ -30,7 +30,7 @@ int fromConfig(Config *cfg,char* addr,int def){
}
}
std::string fromConfig(Config *cfg,char * addr,std::string def){
std::string fromConfig(Config *cfg,const char * addr,std::string def){
try{
return cfg->lookup(addr);
} catch(const SettingNotFoundException &nfex){
......@@ -42,7 +42,7 @@ std::string fromConfig(Config *cfg,char * addr,std::string def){
}
}
float fromConfig(Config *cfg,char * addr,float def){
float fromConfig(Config *cfg, const char * addr,float def){
try{
return cfg->lookup(addr);
} catch(const SettingNotFoundException &nfex){
......
......@@ -6,9 +6,9 @@
using namespace libconfig;
int loadConfig(std::string,Config *);
int fromConfig(Config *,char *,int);
std::string fromConfig(Config *,char *,std::string);
float fromConfig(Config *,char *,float);
int fromConfig(Config *,const char *,int);
std::string fromConfig(Config *,const char *,std::string);
float fromConfig(Config *,const char *,float);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment