]> git.lyx.org Git - lyx.git/blobdiff - src/support/lyxstring.C
remove commented HAVE_SSTREAM code
[lyx.git] / src / support / lyxstring.C
index 606e689304baf35e3e50f1fcd10a990edd6352d2..1e3b542a6d7c58e9734eaeb7720a12d03dba48d8 100644 (file)
@@ -460,6 +460,7 @@ lyxstring::~lyxstring()
 
 lyxstring::iterator lyxstring::begin()
 {
+       rep = rep->get_own_copy();
        return rep->s;
 }
 
@@ -472,6 +473,7 @@ lyxstring::const_iterator lyxstring::begin() const
 
 lyxstring::iterator lyxstring::end()
 {
+       rep = rep->get_own_copy();
        return rep->s + rep->sz;
 }
 
@@ -1315,7 +1317,7 @@ lyxstring & lyxstring::replace(size_type i, size_type n, value_type const * p)
 lyxstring & lyxstring::replace(size_type i, size_type n,
                               size_type n2, value_type c)
 {
-       Assert(i < rep->sz);  // OURS!
+       Assert(i <= rep->sz);  // OURS!
        TestlyxstringInvariant(this);
 
        rep = rep->get_own_copy();