[llvm-commits] [llvm] r101776 - /llvm/trunk/include/llvm/ADT/StringRef.h

Dan Gohman gohman at apple.com
Mon Apr 19 08:38:38 PDT 2010


Author: djg
Date: Mon Apr 19 10:38:38 2010
New Revision: 101776

URL: http://llvm.org/viewvc/llvm-project?rev=101776&view=rev
Log:
These functions don't need to access this.

Modified:
    llvm/trunk/include/llvm/ADT/StringRef.h

Modified: llvm/trunk/include/llvm/ADT/StringRef.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=101776&r1=101775&r2=101776&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/StringRef.h (original)
+++ llvm/trunk/include/llvm/ADT/StringRef.h Mon Apr 19 10:38:38 2010
@@ -44,8 +44,8 @@
     // 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





More information about the llvm-commits mailing list