summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-24 14:19:59 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-11-24 14:19:59 -0200
commit2651ec7b04923db3c64ff59fcc5cb9c966d685f6 (patch)
tree9c3b7f2ad88c5aef49c1f2760272a45cd6c09be6
parent23de22f194dd1e5dfccce0cc03302af4f4018727 (diff)
downloadshiboken-2651ec7b04923db3c64ff59fcc5cb9c966d685f6.tar.gz
shiboken-2651ec7b04923db3c64ff59fcc5cb9c966d685f6.tar.xz
shiboken-2651ec7b04923db3c64ff59fcc5cb9c966d685f6.zip
Speed up hasWrapper function using the find method instead of count.
-rw-r--r--libshiboken/bindingmanager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libshiboken/bindingmanager.cpp b/libshiboken/bindingmanager.cpp
index 9f73833c..a4385261 100644
--- a/libshiboken/bindingmanager.cpp
+++ b/libshiboken/bindingmanager.cpp
@@ -161,7 +161,7 @@ BindingManager& BindingManager::instance() {
bool BindingManager::hasWrapper(const void* cptr)
{
- return m_d->wrapperMapper.count(cptr);
+ return m_d->wrapperMapper.find(cptr) != m_d->wrapperMapper.end();
}
void BindingManager::registerWrapper(SbkObject* pyObj, void* cptr)