From 5a8422683380a76bc2b00cc23237d51b7704e2fa Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Tue, 25 Jul 2017 09:49:56 +0100 Subject: Added the const qualifier to the keys in the constantMap --- lib/Module/KModule.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Module') diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp index 19408d65..751776b9 100644 --- a/lib/Module/KModule.cpp +++ b/lib/Module/KModule.cpp @@ -104,7 +104,7 @@ KModule::~KModule() { ie = functions.end(); it != ie; ++it) delete *it; - for (std::map::iterator it=constantMap.begin(), + for (std::map::iterator it=constantMap.begin(), itE=constantMap.end(); it!=itE;++it) delete it->second; @@ -415,8 +415,8 @@ void KModule::prepare(const Interpreter::ModuleOptions &opts, } } -KConstant* KModule::getKConstant(Constant *c) { - std::map::iterator it = constantMap.find(c); +KConstant* KModule::getKConstant(const Constant *c) { + std::map::iterator it = constantMap.find(c); if (it != constantMap.end()) return it->second; return NULL; -- cgit 1.4.1