aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-28 17:18:17 +0200
committerEugene Sandulenko2016-05-28 17:18:17 +0200
commit31913eee17dea5a5baad1d4927dd723e22afd097 (patch)
tree8a15d00a7e684b07982f321d97e6da242ab12a7e
parent8fc736fb2dc676c9b25100b24e96dfb4d73c1a00 (diff)
downloadscummvm-rg350-31913eee17dea5a5baad1d4927dd723e22afd097.tar.gz
scummvm-rg350-31913eee17dea5a5baad1d4927dd723e22afd097.tar.bz2
scummvm-rg350-31913eee17dea5a5baad1d4927dd723e22afd097.zip
COMMON: Fix warning about shadowing class members
-rw-r--r--common/str.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/common/str.cpp b/common/str.cpp
index c41e958349..3ff49a90c6 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -144,7 +144,7 @@ void String::ensureCapacity(uint32 new_size, bool keep_old) {
// Allocate new storage
newStorage = new char[newCapacity];
assert(newStorage);
-
+
// Copy old data if needed, elsewise reset the new storage.
if (keep_old) {
@@ -447,12 +447,12 @@ void String::replace(uint32 pos, uint32 count, const char *str) {
replace(pos, count, str, 0, strlen(str));
}
-void String::replace(iterator begin, iterator end, const String &str) {
- replace(begin - _str, end - begin, str._str, 0, str._size);
+void String::replace(iterator begin_, iterator end_, const String &str) {
+ replace(begin_ - _str, end_ - begin_, str._str, 0, str._size);
}
-void String::replace(iterator begin, iterator end, const char *str) {
- replace(begin - _str, end - begin, str, 0, strlen(str));
+void String::replace(iterator begin_, iterator end_, const char *str) {
+ replace(begin_ - _str, end_ - begin_, str, 0, strlen(str));
}
void String::replace(uint32 posOri, uint32 countOri, const String &str,
@@ -472,21 +472,21 @@ void String::replace(uint32 posOri, uint32 countOri, const char *str,
_size = newSize;
// Push the old characters to the end of the string
- for (uint32 i = _size; i >= posOri + countDest; i--)
+ for (uint32 i = _size; i >= posOri + countDest; i--)
_str[i] = _str[i - offset];
} else if (countOri > countDest){
uint32 offset = countOri - countDest; ///< Number of positions that we have to pull back
// Pull the remainder string back
- for (uint32 i = posOri + countDest; i < _size; i++)
- _str[i] = _str[i + offset];
+ for (uint32 i = posOri + countDest; i < _size; i++)
+ _str[i] = _str[i + offset];
- _size -= offset;
+ _size -= offset;
}
// Copy the replaced part of the string
- for (uint32 i = 0; i < countDest; i++)
+ for (uint32 i = 0; i < countDest; i++)
_str[posOri + i] = str[posDest + i];
}