Pass std::string by reference. Thanks Chris!
authorDan Gohman <gohman@apple.com>
Tue, 24 Jun 2008 16:40:22 +0000 (16:40 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 24 Jun 2008 16:40:22 +0000 (16:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52678 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/StringMap.h

index 0a4a5d631d9c55df99e10d12b5f51eeff4348fc3..3e7e9e625b8210805b051718cd3d5952dddfa9cb 100644 (file)
@@ -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);