From: Dan Gohman Date: Tue, 24 Jun 2008 16:40:22 +0000 (+0000) Subject: Pass std::string by reference. Thanks Chris! X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2b08676ca8b6a19ba02df7a2237b8d43531a586b;p=oota-llvm.git Pass std::string by reference. Thanks Chris! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52678 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/StringMap.h b/include/llvm/ADT/StringMap.h index 0a4a5d631d9..3e7e9e625b8 100644 --- a/include/llvm/ADT/StringMap.h +++ b/include/llvm/ADT/StringMap.h @@ -384,7 +384,7 @@ public: return true; } - bool erase(std::string Key) { + bool erase(const std::string &Key) { iterator I = find(Key); if (I == end()) return false; erase(I);