Fix compiler warnings, explicitly cast by default

This commit is contained in:
Lion Kortlepel
2020-11-01 12:19:19 +01:00
parent 8bc35fb82e
commit 953131289d
11 changed files with 60 additions and 55 deletions

View File

@@ -33,13 +33,13 @@ void SetValues(const std::string& Line, int Index) {
}
Data = Data.substr(1);
std::string::size_type sz;
bool Boolean = std::string(Data).find("true") != -1;//searches for "true"
bool FoundTrue = std::string(Data).find("true") != std::string::npos;//searches for "true"
switch (Index) {
case 1 :
Debug = Boolean;//checks and sets the Debug Value
Debug = FoundTrue;//checks and sets the Debug Value
break;
case 2 :
Private = Boolean;//checks and sets the Private Value
Private = FoundTrue;//checks and sets the Private Value
break;
case 3 :
Port = std::stoi(Data, &sz);//sets the Port
@@ -146,4 +146,4 @@ void InitConfig(){
exit(0);
}
if(Debug)DebugData();
}
}