aboutsummaryrefslogtreecommitdiff
path: root/common/str.h
diff options
context:
space:
mode:
authorNeeraj Kumar2010-06-08 17:24:29 +0000
committerNeeraj Kumar2010-06-08 17:24:29 +0000
commit207a5e0779de9f0002b0b1984bde90ce6597e1f2 (patch)
tree98883ef89261afd4288f6dadbffe436d5d966dfc /common/str.h
parente00e94ae18aeb1ed460476f822e20b5bdfe171a4 (diff)
parent356728dab7f2c4cedf73684d7fe3b968be7396fd (diff)
downloadscummvm-rg350-207a5e0779de9f0002b0b1984bde90ce6597e1f2.tar.gz
scummvm-rg350-207a5e0779de9f0002b0b1984bde90ce6597e1f2.tar.bz2
scummvm-rg350-207a5e0779de9f0002b0b1984bde90ce6597e1f2.zip
updated my outdate copy of trunk, added couple of more tests in gfxtests
svn-id: r49510
Diffstat (limited to 'common/str.h')
-rw-r--r--common/str.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/str.h b/common/str.h
index 12e2b0d2d3..189c37adb4 100644
--- a/common/str.h
+++ b/common/str.h
@@ -222,6 +222,12 @@ public:
typedef const char * const_iterator;
iterator begin() {
+ // Since the user could potentially
+ // change the string via the returned
+ // iterator we have to assure we are
+ // pointing to a unique storage.
+ makeUnique();
+
return _str;
}