From 60f8132d2eede3a477248883274d2712221b7737 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 8 Dec 2014 14:07:51 -0500 Subject: [PATCH] stringutil: Add early-exit case to ReplaceAll If both 'replaceands' are the same, the result string can just be returned. --- base/stringutil.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/stringutil.cpp b/base/stringutil.cpp index 2c8bd1e56a..134a9b1dfd 100644 --- a/base/stringutil.cpp +++ b/base/stringutil.cpp @@ -230,6 +230,10 @@ void SplitString(const std::string& str, const char delim, std::vector