From 49927308c66e7992b8e7ffcf722aef2d8a157e6b Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 15 Dec 2015 13:39:40 +0100 Subject: [PATCH] Changed: Use std::string insteaf of const char* for filenames in CPersistentDataRecord --- .../src/general_utilities_service/merge_commands.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/ryzom/server/src/general_utilities_service/merge_commands.cpp b/code/ryzom/server/src/general_utilities_service/merge_commands.cpp index ef661eb75..4f295481d 100644 --- a/code/ryzom/server/src/general_utilities_service/merge_commands.cpp +++ b/code/ryzom/server/src/general_utilities_service/merge_commands.cpp @@ -62,7 +62,7 @@ NLMISC_CATEGORISED_COMMAND(ShardMerge,mergeGuildIdFix,"set the guild ids in the // read the file static CPersistentDataRecord pdr; pdr.clear(); - pdr.readFromFile(fdc[i].FileName.c_str()); + pdr.readFromFile(fdc[i].FileName); // convert to XML NLMISC::CSString inputString; @@ -80,8 +80,8 @@ NLMISC_CATEGORISED_COMMAND(ShardMerge,mergeGuildIdFix,"set the guild ids in the pdr.fromXML(resultString); // write the file - pdr.writeToFile((fdc[i].FileName+".new.xml").c_str()); - pdr.writeToFile((fdc[i].FileName+".new.bin").c_str()); + pdr.writeToFile(fdc[i].FileName+".new.xml"); + pdr.writeToFile(fdc[i].FileName+".new.bin"); } return true; @@ -109,7 +109,7 @@ NLMISC_CATEGORISED_COMMAND(ShardMerge,mergeChangeCharacterNames,"change names of DROP_IF(!NLMISC::CFile::fileExists(fileName),"Skipping inexistant file: "+fileName,continue); static CPersistentDataRecord pdr; pdr.clear(); - pdr.readFromFile(fileName.c_str()); + pdr.readFromFile(fileName); // convert to XML NLMISC::CSString inputString; @@ -127,8 +127,8 @@ NLMISC_CATEGORISED_COMMAND(ShardMerge,mergeChangeCharacterNames,"change names of pdr.fromXML(resultString); // write the file - pdr.writeToFile((fileName+".new.xml").c_str()); - pdr.writeToFile((fileName+".new.bin").c_str()); + pdr.writeToFile(fileName+".new.xml"); + pdr.writeToFile(fileName+".new.bin"); } return true;