[vmkit-commits] [vmkit] r54345 - /vmkit/trunk/lib/N3/VMCore/LockedMap.h

Nicolas Geoffray nicolas.geoffray at lip6.fr
Tue Aug 5 02:02:30 CDT 2008


Author: geoffray
Date: Tue Aug  5 02:02:30 2008
New Revision: 54345

URL: http://llvm.org/viewvc/llvm-project?rev=54345&view=rev
Log:
Constify otherwise apple gcc would complain.


Modified:
    vmkit/trunk/lib/N3/VMCore/LockedMap.h

Modified: vmkit/trunk/lib/N3/VMCore/LockedMap.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/LockedMap.h?rev=54345&r1=54344&r2=54345&view=diff

==============================================================================
--- vmkit/trunk/lib/N3/VMCore/LockedMap.h (original)
+++ vmkit/trunk/lib/N3/VMCore/LockedMap.h Tue Aug  5 02:02:30 2008
@@ -39,12 +39,12 @@
 template<class Key, class Container, class Compare, class Upcall>
 class LockedMap : public mvm::Object {
 public:
-  typedef typename std::map<Key, Container*, Compare>::iterator iterator;
+  typedef typename std::map<const Key, Container*, Compare>::iterator iterator;
   typedef Container* (*funcCreate)(Key& V, Upcall* ass);
 
   mvm::Lock* lock;
   std::map<Key, Container*, Compare,
-           gc_allocator<std::pair<Key, Container*> > > map;
+           gc_allocator<std::pair<const Key, Container*> > > map;
   
   inline Container* lookupOrCreate(Key& V, Upcall* ass, funcCreate func) {
     lock->lock();
@@ -200,11 +200,11 @@
 
 class UTF8Map : public mvm::Object {
 public:
-  typedef std::multimap<uint32, const UTF8*>::iterator iterator;
+  typedef std::multimap<const uint32, const UTF8*>::iterator iterator;
   
   mvm::Lock* lock;
   std::multimap<uint32, const UTF8*, std::less<uint32>,
-                gc_allocator<std::pair<uint32, const UTF8*> > > map;
+                gc_allocator<std::pair<const uint32, const UTF8*> > > map;
   static VirtualTable* VT;
   const UTF8* lookupOrCreateAsciiz(const char* asciiz); 
   const UTF8* lookupOrCreateReader(const uint16* buf, uint32 size);




More information about the vmkit-commits mailing list