r218385 - Constify a functor's function call operator because it can/should be.

David Blaikie dblaikie at gmail.com
Wed Sep 24 09:35:30 PDT 2014


Author: dblaikie
Date: Wed Sep 24 11:35:29 2014
New Revision: 218385

URL: http://llvm.org/viewvc/llvm-project?rev=218385&view=rev
Log:
Constify a functor's function call operator because it can/should be.

Patch by Graham Lee (graham at iamleeg.com)!

Modified:
    cfe/trunk/include/clang/Basic/SourceManager.h

Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=218385&r1=218384&r2=218385&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Wed Sep 24 11:35:29 2014
@@ -1677,7 +1677,7 @@ class BeforeThanCompare<SourceRange> {
 public:
   explicit BeforeThanCompare(SourceManager &SM) : SM(SM) { }
 
-  bool operator()(SourceRange LHS, SourceRange RHS) {
+  bool operator()(SourceRange LHS, SourceRange RHS) const {
     return SM.isBeforeInTranslationUnit(LHS.getBegin(), RHS.getBegin());
   }
 };





More information about the cfe-commits mailing list