]> git.lyx.org Git - features.git/commitdiff
Paragraph::appendString(): use docstring::append().
authorAbdelrazak Younes <younes@lyx.org>
Wed, 24 Oct 2007 09:01:51 +0000 (09:01 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Wed, 24 Oct 2007 09:01:51 +0000 (09:01 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21173 a592a061-630c-0410-9148-cb99ea01b6c8

src/Paragraph.cpp

index 314332f370edebe00feb23c4c5a3bc36ec8b165e..8b3d7df38f039a435d5356c85d083b6f0dcab784 100644 (file)
@@ -1222,12 +1222,13 @@ void Paragraph::appendString(docstring const & s, Font const & font,
        if (newsize >= capacity)
                d->text_.reserve(std::max(capacity + 100, newsize));
 
+       // when appending characters, no need to update tables
+       d->text_.append(s);
+
        // FIXME: Optimize this!
        for (pos_type i = 0; i != end; ++i) {
                // track change
                d->changes_.insert(change, i);
-               // when appending characters, no need to update tables
-               d->text_.push_back(s[i]);
        }
        d->fontlist_.setRange(oldsize, newsize, font);
 }