]> git.lyx.org Git - lyx.git/blobdiff - src/support/LSubstring.C
remove !NEW_INSETS cruft
[lyx.git] / src / support / LSubstring.C
index 7624dda2bfd08109941f86e49da4ce4499526120..ddf132c007f565f18d4cf61193e268cc75ab374a 100644 (file)
 #include <config.h>
 #endif
 
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
 #include "LSubstring.h"
 
 
@@ -39,7 +43,7 @@ LSubstring::LSubstring(string & s, string::value_type const * p)
 LSubstring::LSubstring(string & s, LRegex const & r)
        : ps(&s)
 {
-       LRegex::MatchPair res = r.first_match(s);
+       LRegex::MatchPair const res = r.first_match(s);
        if (res.first != string::npos) {
                n = res.second;
                pos = res.first;
@@ -59,19 +63,19 @@ LSubstring & LSubstring::operator=(string const & s)
 
 LSubstring & LSubstring::operator=(LSubstring const & s)
 {
-       ps->replace(pos, n, string(s, 0, string::npos));
+       ps->replace(pos, n, s);
        return *this;
 }
 
 
-LSubstring & LSubstring::operator=(char const * p)
+LSubstring & LSubstring::operator=(string::value_type const * p)
 {
        ps->replace(pos, n, p);
        return *this;
 }
 
 
-LSubstring & LSubstring::operator=(char c)
+LSubstring & LSubstring::operator=(string::value_type c)
 {
        ps->replace(pos, n, 1, c);
        return *this;