These functions don't need to access this.
authorDan Gohman <gohman@apple.com>
Mon, 19 Apr 2010 15:38:38 +0000 (15:38 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 19 Apr 2010 15:38:38 +0000 (15:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101776 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/StringRef.h

index 925777000f52e00c7a0d10c4d0d0a48c57c92eb7..ab6358bdfa6cabe0e86f3edcc0a48bab6dd3cdac 100644 (file)
@@ -44,8 +44,8 @@ namespace llvm {
     // Workaround PR5482: nearly all gcc 4.x miscompile StringRef and std::min()
     // Changing the arg of min to be an integer, instead of a reference to an
     // integer works around this bug.
-    size_t min(size_t a, size_t b) const { return a < b ? a : b; }
-    size_t max(size_t a, size_t b) const { return a > b ? a : b; }
+    static size_t min(size_t a, size_t b) { return a < b ? a : b; }
+    static size_t max(size_t a, size_t b) { return a > b ? a : b; }
 
   public:
     /// @name Constructors