summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--pcrecpp.cc4
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ae58c4d..a97fe92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,8 @@ Version 7.7 05-Mar-08
8. Applied Craig's patch to pcrecpp.cc to fix a problem in OS X that was
caused by fix #2 above. (Subsequently also a second patch to fix the
first patch. And a third patch - this was a messy problem.)
+
+9. Applied Craig's patch to remove the use of push_back().
Version 7.6 28-Jan-08
diff --git a/pcrecpp.cc b/pcrecpp.cc
index c391652..ba0ff6e 100644
--- a/pcrecpp.cc
+++ b/pcrecpp.cc
@@ -605,14 +605,14 @@ bool RE::Rewrite(string *out, const StringPiece &rewrite,
if (start >= 0)
out->append(text.data() + start, vec[2 * n + 1] - start);
} else if (c == '\\') {
- out->push_back('\\');
+ *out += '\\';
} else {
//fprintf(stderr, "invalid rewrite pattern: %.*s\n",
// rewrite.size(), rewrite.data());
return false;
}
} else {
- out->push_back(c);
+ *out += c;
}
}
return true;