diff --git a/code/nel/include/nel/ligo/ligo_config.h b/code/nel/include/nel/ligo/ligo_config.h index 4d93843e5..092f6caba 100644 --- a/code/nel/include/nel/ligo/ligo_config.h +++ b/code/nel/include/nel/ligo/ligo_config.h @@ -107,7 +107,7 @@ public: const CPrimitiveClass *getPrimitiveClass (const NLLIGO::IPrimitive &primitive) const; // Get a primitive class - const CPrimitiveClass *getPrimitiveClass (const char *className) const; + const CPrimitiveClass *getPrimitiveClass (const std::string &className) const; // Get the primitive color NLMISC::CRGBA getPrimitiveColor (const NLLIGO::IPrimitive &primitive); @@ -134,10 +134,10 @@ public: bool canBeRoot (const NLLIGO::IPrimitive &primitive); // Read a property from an XML file - bool getPropertyString (std::string &result, const char *filename, xmlNodePtr xmlNode, const char *propName); + bool getPropertyString (std::string &result, const std::string &filename, xmlNodePtr xmlNode, const std::string &propName); // Output error message - void syntaxError (const char *filename, xmlNodePtr xmlNode, const char *format, ...); + void syntaxError (const std::string &filename, xmlNodePtr xmlNode, const char *format, ...); virtual void errorMessage (const char *format, ... ); // Access to the config string @@ -157,7 +157,7 @@ public: private: // Init primitive class manager - bool initPrimitiveClass (const char *filename); + bool initPrimitiveClass (const std::string &ilename); // The primitive class manager std::map _PrimitiveClasses; diff --git a/code/nel/include/nel/misc/path.h b/code/nel/include/nel/misc/path.h index a16b03f15..f42acc91b 100644 --- a/code/nel/include/nel/misc/path.h +++ b/code/nel/include/nel/misc/path.h @@ -209,7 +209,7 @@ public: * \param relativePath is the path to make relative to basePath. * return true if relativePath as been done relative to basePath, false is relativePath has not been changed. */ - bool makePathRelative (const char *basePath, std::string &relativePath); + bool makePathRelative (const std::string &basePath, std::string &relativePath); /** If File in this list is added more than one in an addSearchPath, it doesn't launch a warning. */ @@ -505,7 +505,7 @@ public: * \param relativePath is the path to make relative to basePath. * return true if relativePath as been done relative to basePath, false is relativePath has not been changed. */ - static bool makePathRelative (const char *basePath, std::string &relativePath); + static bool makePathRelative(const std::string &basePath, std::string &relativePath); /** Make path absolute * \param relativePath - The relative path diff --git a/code/nel/src/ligo/ligo_config.cpp b/code/nel/src/ligo/ligo_config.cpp index 7139221e6..0025d4290 100644 --- a/code/nel/src/ligo/ligo_config.cpp +++ b/code/nel/src/ligo/ligo_config.cpp @@ -508,13 +508,13 @@ bool CLigoConfig::canBeRoot (const NLLIGO::IPrimitive &child) // *************************************************************************** -bool CLigoConfig::getPropertyString (std::string &result, const char *filename, xmlNodePtr xmlNode, const char *propName) +bool CLigoConfig::getPropertyString(std::string &result, const std::string &filename, xmlNodePtr xmlNode, const std::string &propName) { // Call the CIXml version if (!CIXml::getPropertyString (result, xmlNode, propName)) { // Output a formated error - syntaxError (filename, xmlNode, "Missing XML node property (%s)", propName); + syntaxError (filename, xmlNode, "Missing XML node property (%s)", propName.c_str()); return false; } return true; @@ -522,7 +522,7 @@ bool CLigoConfig::getPropertyString (std::string &result, const char *filename, // *************************************************************************** -void CLigoConfig::syntaxError (const char *filename, xmlNodePtr xmlNode, const char *format, ...) +void CLigoConfig::syntaxError (const std::string &filename, xmlNodePtr xmlNode, const char *format, ...) { va_list args; va_start( args, format ); @@ -530,7 +530,7 @@ void CLigoConfig::syntaxError (const char *filename, xmlNodePtr xmlNode, const c vsnprintf( buffer, 1024, format, args ); va_end( args ); - errorMessage ("(%s), node (%s), line (%p) :\n%s", filename, xmlNode->name, xmlNode->content, buffer); + errorMessage ("(%s), node (%s), line (%p) :\n%s", filename.c_str(), xmlNode->name, xmlNode->content, buffer); } // *************************************************************************** @@ -589,7 +589,7 @@ const CPrimitiveClass *CLigoConfig::getPrimitiveClass (const IPrimitive &primiti // *************************************************************************** -const CPrimitiveClass *CLigoConfig::getPrimitiveClass (const char *className) const +const CPrimitiveClass *CLigoConfig::getPrimitiveClass(const std::string &className) const { std::map::const_iterator ite = _PrimitiveClasses.find (className); if (ite != _PrimitiveClasses.end ()) diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index b9a49b04b..c6f9786f4 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -2523,7 +2523,7 @@ bool CFile::createDirectoryTree(const std::string &filename) return lastResult; } -bool CPath::makePathRelative (const char *basePath, std::string &relativePath) +bool CPath::makePathRelative (const std::string &basePath, std::string &relativePath) { // Standard path with final slash string tmp = standardizePath (basePath, true);