diff --git a/code/nel/include/nel/misc/common.h b/code/nel/include/nel/misc/common.h index f1c090c2b..c7c1369c5 100644 --- a/code/nel/include/nel/misc/common.h +++ b/code/nel/include/nel/misc/common.h @@ -690,10 +690,10 @@ inline int nlisprint(int c) #endif // Open an url in a browser -bool openURL (const char *url); +bool openURL (const std::string &url); // Open a document -bool openDoc (const char *document); +bool openDoc (const std::string &document); // AntiBug method that return an epsilon if x==0, else x inline float favoid0(float x) diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index 9f9241b82..6453d836d 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -1434,7 +1434,7 @@ LONG GetRegKey(HKEY key, LPCWSTR subkey, LPWSTR retdata) } #endif // NL_OS_WINDOWS -static bool openDocWithExtension (const char *document, const char *ext) +static bool openDocWithExtension (const std::string &document, const std::string &ext) { #ifdef NL_OS_WINDOWS // First try ShellExecute() @@ -1552,18 +1552,18 @@ static bool openDocWithExtension (const char *document, const char *ext) return false; } -bool openURL (const char *url) +bool openURL(const std::string &url) { return openDocWithExtension(url, "htm"); } -bool openDoc (const char *document) +bool openDoc(const std::string &document) { // get extension from document fullpath string ext = CFile::getExtension(document); // try to open document - return openDocWithExtension(document, ext.c_str()); + return openDocWithExtension(document, ext); } } // NLMISC