mirror of
https://github.com/mangosfour/server.git
synced 2025-12-19 13:37:01 +00:00
[8744] Fix 'warning: deleting ‘void*’ is undefined' in SqlOperations.h/SqlOperations.cpp, caused by [8736]. Thanks to Shendor for pointing the problem.
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
a4e3b3e6aa
commit
190c5e6338
4 changed files with 10 additions and 13 deletions
|
|
@ -187,10 +187,7 @@ LocaleConstant GetLocaleByName(const std::string& name);
|
|||
//operator new[] based version of strdup() function! Release memory by using operator delete[] !
|
||||
inline char * mangos_strdup(const char * source)
|
||||
{
|
||||
const size_t length = strlen(source);
|
||||
char * dest = new char[length + 1];
|
||||
//set terminating end-of-string symbol
|
||||
dest[length] = 0;
|
||||
char * dest = new char[strlen(source) + 1];
|
||||
strcpy(dest, source);
|
||||
return dest;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue