diff options
author | George Hazan <ghazan@miranda.im> | 2017-11-23 22:06:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-11-23 22:06:26 +0300 |
commit | 6d6cb956a78b2dbfa7e8d62f4234d8f27b100468 (patch) | |
tree | e41f29a86d93ffc0ca414e8d84c8cdd47847baeb /plugins/Dbx_mdb/src | |
parent | 6bb0abf1e62b18e4029ae0b7b73ee47f3fe3b39d (diff) |
database enumerators => void* instead of LPARAM
Diffstat (limited to 'plugins/Dbx_mdb/src')
-rw-r--r-- | plugins/Dbx_mdb/src/dbintf.h | 6 | ||||
-rw-r--r-- | plugins/Dbx_mdb/src/dbmodulechain.cpp | 4 | ||||
-rw-r--r-- | plugins/Dbx_mdb/src/dbsettings.cpp | 8 | ||||
-rw-r--r-- | plugins/Dbx_mdb/src/mdbx/osal.c | 2 | ||||
-rw-r--r-- | plugins/Dbx_mdb/src/stdafx.h | 1 |
5 files changed, 11 insertions, 10 deletions
diff --git a/plugins/Dbx_mdb/src/dbintf.h b/plugins/Dbx_mdb/src/dbintf.h index 8c93379094..4c1c757aed 100644 --- a/plugins/Dbx_mdb/src/dbintf.h +++ b/plugins/Dbx_mdb/src/dbintf.h @@ -174,13 +174,13 @@ public: STDMETHODIMP_(MEVENT) FindNextEvent(MCONTACT contactID, MEVENT hDbEvent);
STDMETHODIMP_(MEVENT) FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent);
- STDMETHODIMP_(BOOL) EnumModuleNames(DBMODULEENUMPROC pFunc, const void *pParam);
+ STDMETHODIMP_(BOOL) EnumModuleNames(DBMODULEENUMPROC pFunc, void *pParam);
STDMETHODIMP_(BOOL) GetContactSettingWorker(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, int isStatic);
STDMETHODIMP_(BOOL) WriteContactSetting(MCONTACT contactID, DBCONTACTWRITESETTING *dbcws);
STDMETHODIMP_(BOOL) DeleteContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting);
- STDMETHODIMP_(BOOL) EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, const void *param);
- STDMETHODIMP_(BOOL) EnumResidentSettings(DBMODULEENUMPROC pFunc, const void *pParam);
+ STDMETHODIMP_(BOOL) EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param);
+ STDMETHODIMP_(BOOL) EnumResidentSettings(DBMODULEENUMPROC pFunc, void *pParam);
STDMETHODIMP_(BOOL) IsSettingEncrypted(LPCSTR szModule, LPCSTR szSetting);
STDMETHODIMP_(BOOL) MetaDetouchSub(DBCachedContact *cc, int nSub);
diff --git a/plugins/Dbx_mdb/src/dbmodulechain.cpp b/plugins/Dbx_mdb/src/dbmodulechain.cpp index 66e7cf1509..3e8590f2de 100644 --- a/plugins/Dbx_mdb/src/dbmodulechain.cpp +++ b/plugins/Dbx_mdb/src/dbmodulechain.cpp @@ -64,10 +64,10 @@ char* CDbxMdb::GetModuleName(uint32_t dwId) return it != m_Modules.end() ? const_cast<char*>(it->second.c_str()) : nullptr;
}
-STDMETHODIMP_(BOOL) CDbxMdb::EnumModuleNames(DBMODULEENUMPROC pFunc, const void *pParam)
+STDMETHODIMP_(BOOL) CDbxMdb::EnumModuleNames(DBMODULEENUMPROC pFunc, void *pParam)
{
for (auto it = m_Modules.begin(); it != m_Modules.end(); ++it)
- if (int ret = pFunc(it->second.c_str(), it->first, (LPARAM)pParam))
+ if (int ret = pFunc(it->second.c_str(), pParam))
return ret;
return 0;
diff --git a/plugins/Dbx_mdb/src/dbsettings.cpp b/plugins/Dbx_mdb/src/dbsettings.cpp index 14f6f7d3c5..5e287292f5 100644 --- a/plugins/Dbx_mdb/src/dbsettings.cpp +++ b/plugins/Dbx_mdb/src/dbsettings.cpp @@ -415,7 +415,7 @@ STDMETHODIMP_(BOOL) CDbxMdb::DeleteContactSetting(MCONTACT contactID, LPCSTR szM return 0;
}
-STDMETHODIMP_(BOOL) CDbxMdb::EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, const void *param)
+STDMETHODIMP_(BOOL) CDbxMdb::EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param)
{
int result = -1;
@@ -430,16 +430,16 @@ STDMETHODIMP_(BOOL) CDbxMdb::EnumContactSettings(MCONTACT hContact, DBSETTINGENU const DBSettingKey *pKey = (const DBSettingKey*)key.iov_base;
if (pKey->hContact != hContact || pKey->dwModuleId != keyVal.dwModuleId)
break;
- result = pfnEnumProc(pKey->szSettingName, LPARAM(param));
+ result = pfnEnumProc(pKey->szSettingName, param);
}
return result;
}
-STDMETHODIMP_(BOOL) CDbxMdb::EnumResidentSettings(DBMODULEENUMPROC pFunc, const void *pParam)
+STDMETHODIMP_(BOOL) CDbxMdb::EnumResidentSettings(DBMODULEENUMPROC pFunc, void *pParam)
{
for (int i = 0; i < m_lResidentSettings.getCount(); i++)
- if (int ret = pFunc(m_lResidentSettings[i], 0, (LPARAM)pParam))
+ if (int ret = pFunc(m_lResidentSettings[i], pParam))
return ret;
return 0;
}
diff --git a/plugins/Dbx_mdb/src/mdbx/osal.c b/plugins/Dbx_mdb/src/mdbx/osal.c index d9026cfadf..5a8ec58002 100644 --- a/plugins/Dbx_mdb/src/mdbx/osal.c +++ b/plugins/Dbx_mdb/src/mdbx/osal.c @@ -772,7 +772,7 @@ int mdbx_mmap(int flags, mdbx_mmap_t *map, size_t must, size_t limit) { } NTSTATUS rc; -#ifdef _WIN64 +#if defined(_WIN64) && defined(WOF_CURRENT_VERSION) struct { WOF_EXTERNAL_INFO wof_info; union { diff --git a/plugins/Dbx_mdb/src/stdafx.h b/plugins/Dbx_mdb/src/stdafx.h index 1fc3afc599..53839424e1 100644 --- a/plugins/Dbx_mdb/src/stdafx.h +++ b/plugins/Dbx_mdb/src/stdafx.h @@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <windows.h>
#include <time.h>
#include <process.h>
+
#include <memory>
#include <vector>
#include <algorithm>
|