Codechange: move casting a "const char *" to "char *" to the caller
It is not nice to have your definition say you won't change a value while in fact the whole reason for your existance is to change it.
This commit is contained in:

committed by
Patric Stout

parent
665e3c1f45
commit
7713c3e3cc
@@ -266,10 +266,10 @@ void StrMakeValidInPlace(char *str, const char *last, StringValidationSettings s
|
||||
* otherwise use StrMakeValidInPlace(str, last, settings) variant.
|
||||
* @param str The string (of which you are sure ends with '\0') to validate.
|
||||
*/
|
||||
void StrMakeValidInPlace(const char *str, StringValidationSettings settings)
|
||||
void StrMakeValidInPlace(char *str, StringValidationSettings settings)
|
||||
{
|
||||
/* We know it is '\0' terminated. */
|
||||
StrMakeValidInPlace(const_cast<char *>(str), str + strlen(str), settings);
|
||||
StrMakeValidInPlace(str, str + strlen(str), settings);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user