(svn r16422) -Codechange: use const_cast for removing const and warn when const is (accidentally?) removed using C-style casts.

This commit is contained in:
rubidium
2009-05-24 21:09:00 +00:00
parent 0d99b6c71c
commit 168ae6f7e2
12 changed files with 18 additions and 20 deletions

View File

@@ -340,7 +340,7 @@ static int TruncateString(char *str, int maxw)
ddd_w = ddd = GetCharacterWidth(size, '.') * 3;
for (ddd_pos = str; (c = Utf8Consume((const char **)&str)) != '\0'; ) {
for (ddd_pos = str; (c = Utf8Consume(const_cast<const char **>(&str))) != '\0'; ) {
if (IsPrintable(c)) {
w += GetCharacterWidth(size, c);
@@ -577,7 +577,7 @@ uint32 FormatStringLinebreaks(char *str, int maxw)
int w = 0;
for (;;) {
WChar c = Utf8Consume((const char **)&str);
WChar c = Utf8Consume(const_cast<const char **>(&str));
/* whitespace is where we will insert the line-break */
if (IsWhitespace(c)) last_space = str;