summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdb/src/dbmodulechain.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-07-06 18:44:56 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-07-06 18:44:56 +0000
commit79e4ee10e9ebd6382f819502285685ce21e69ef0 (patch)
tree75d9a769d796bd03d624a43c130e4830a0a9a3fd /plugins/Dbx_mdb/src/dbmodulechain.cpp
parenta113c5dfbcb862c2cf0a49f3f3e873d7325c0c53 (diff)
dbx_lmdb: code optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@17069 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/dbmodulechain.cpp')
-rw-r--r--plugins/Dbx_mdb/src/dbmodulechain.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/Dbx_mdb/src/dbmodulechain.cpp b/plugins/Dbx_mdb/src/dbmodulechain.cpp
index 142126c6dc..2b821023d6 100644
--- a/plugins/Dbx_mdb/src/dbmodulechain.cpp
+++ b/plugins/Dbx_mdb/src/dbmodulechain.cpp
@@ -31,7 +31,7 @@ int CDbxMdb::InitModules()
MDB_val key, data;
while (mdb_cursor_get(cursor, &key, &data, MDB_NEXT) == MDB_SUCCESS)
{
- DWORD iMod = *(DWORD*)key.mv_data;
+ uint32_t iMod = *(uint32_t*)key.mv_data;
const char *szMod = (const char*)data.mv_data;
m_Modules[iMod] = szMod;
}
@@ -39,10 +39,10 @@ int CDbxMdb::InitModules()
}
// will create the offset if it needs to
-DWORD CDbxMdb::GetModuleID(const char *szName)
+uint32_t CDbxMdb::GetModuleID(const char *szName)
{
- DWORD iHash = mir_hashstr(szName);
- if (auto it = m_Modules.find(iHash) == m_Modules.end())
+ uint32_t iHash = mir_hashstr(szName);
+ if (m_Modules.find(iHash) == m_Modules.end())
{
MDB_val key = { sizeof(iHash), &iHash }, data = { strlen(szName) + 1, (void*)szName };
@@ -58,7 +58,7 @@ DWORD CDbxMdb::GetModuleID(const char *szName)
return iHash;
}
-char* CDbxMdb::GetModuleName(DWORD dwId)
+char* CDbxMdb::GetModuleName(uint32_t dwId)
{
auto it = m_Modules.find(dwId);
return it != m_Modules.end() ? const_cast<char*>(it->second.c_str()) : nullptr;