[llvm-commits] [llvm] r41111 - in /llvm/trunk: include/llvm/ADT/SmallPtrSet.h lib/Support/SmallPtrSet.cpp

Anton Korobeynikov asl at math.spbu.ru
Wed Aug 15 14:12:31 PDT 2007


Author: asl
Date: Wed Aug 15 16:12:30 2007
New Revision: 41111

URL: http://llvm.org/viewvc/llvm-project?rev=41111&view=rev
Log:
Properly use const qualifiers

Modified:
    llvm/trunk/include/llvm/ADT/SmallPtrSet.h
    llvm/trunk/lib/Support/SmallPtrSet.cpp

Modified: llvm/trunk/include/llvm/ADT/SmallPtrSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallPtrSet.h?rev=41111&r1=41110&r2=41111&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallPtrSet.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallPtrSet.h Wed Aug 15 16:12:30 2007
@@ -103,9 +103,9 @@
   
   /// erase - If the set contains the specified pointer, remove it and return
   /// true, otherwise return false.
-  bool erase(void * const Ptr);
+  bool erase(const void * Ptr);
   
-  bool count(void * const Ptr) const {
+  bool count(const void * Ptr) const {
     if (isSmall()) {
       // Linear search for the item.
       for (const void *const *APtr = SmallArray,

Modified: llvm/trunk/lib/Support/SmallPtrSet.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SmallPtrSet.cpp?rev=41111&r1=41110&r2=41111&view=diff

==============================================================================
--- llvm/trunk/lib/Support/SmallPtrSet.cpp (original)
+++ llvm/trunk/lib/Support/SmallPtrSet.cpp Wed Aug 15 16:12:30 2007
@@ -69,7 +69,7 @@
   return true;
 }
 
-bool SmallPtrSetImpl::erase(void * const Ptr) {
+bool SmallPtrSetImpl::erase(const void * Ptr) {
   if (isSmall()) {
     // Check to see if it is in the set.
     for (const void **APtr = SmallArray, **E = SmallArray+NumElements;





More information about the llvm-commits mailing list