1
0
Fork 0

Change Config::PrintConfig to use std::string

This commit is contained in:
Patryk Obara 2020-04-04 03:31:54 +02:00 committed by Patryk Obara
parent 5a41709a47
commit f243f585ed
4 changed files with 12 additions and 12 deletions

View file

@ -2585,8 +2585,8 @@ static void launcheditor() {
Cross::GetPlatformConfigName(file);
path += file;
FILE* f = fopen(path.c_str(),"r");
if(!f && !control->PrintConfig(path.c_str())) {
printf("tried creating %s. but failed.\n",path.c_str());
if (!f && !control->PrintConfig(path)) {
printf("tried creating %s. but failed.\n", path.c_str());
exit(1);
}
if(f) fclose(f);
@ -2675,8 +2675,8 @@ static void printconfiglocation() {
path += file;
FILE* f = fopen(path.c_str(),"r");
if(!f && !control->PrintConfig(path.c_str())) {
printf("tried creating %s. but failed",path.c_str());
if (!f && !control->PrintConfig(path)) {
printf("tried creating %s. but failed", path.c_str());
exit(1);
}
if(f) fclose(f);
@ -2829,7 +2829,7 @@ int main(int argc, char* argv[]) {
Cross::CreatePlatformConfigDir(config_path);
Cross::GetPlatformConfigName(config_file);
config_combined = config_path + config_file;
if (control->PrintConfig(config_combined.c_str())) {
if (control->PrintConfig(config_combined)) {
LOG_MSG("CONFIG: Generating default configuration.\n"
"CONFIG: Writing it to %s",
config_combined.c_str());
@ -2864,7 +2864,7 @@ int main(int argc, char* argv[]) {
Cross::CreatePlatformConfigDir(config_path);
Cross::GetPlatformConfigName(config_file);
config_combined = config_path + config_file;
if (control->PrintConfig(config_combined.c_str())) {
if (control->PrintConfig(config_combined)) {
LOG_MSG("CONFIG: Generating default configuration.\n"
"CONFIG: Writing it to %s",
config_combined.c_str());