[llvm-commits] [vmkit] r51044 - /vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Tue May 13 07:54:57 PDT 2008
Author: geoffray
Date: Tue May 13 09:54:57 2008
New Revision: 51044
URL: http://llvm.org/viewvc/llvm-project?rev=51044&view=rev
Log:
Fix constness in map types.
Modified:
vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h
Modified: vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h?rev=51044&r1=51043&r2=51044&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h Tue May 13 09:54:57 2008
@@ -52,12 +52,12 @@
template<class Key, class Container, class Compare>
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, Jnjvm *vm);
mvm::Lock* lock;
- std::map<Key, Container, Compare,
- gc_allocator<std::pair<Key, Container> > > map;
+ std::map<const Key, Container, Compare,
+ gc_allocator<std::pair<const Key, Container> > > map;
inline Container lookupOrCreate(Key& V, Jnjvm *vm, funcCreate func) {
lock->lock();
@@ -103,11 +103,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;
+ std::multimap<const uint32, const UTF8*, std::less<uint32>,
+ gc_allocator< std::pair<const uint32, const UTF8*> > > map;
static VirtualTable* VT;
const UTF8* lookupOrCreateAsciiz(Jnjvm* vm, const char* asciiz);
const UTF8* lookupOrCreateReader(Jnjvm* vm, const uint16* buf, uint32 size);
More information about the llvm-commits
mailing list