summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/classMTime.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 14:42:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 14:42:51 +0000
commit33953cc6a0fab6a91af293c6838f8a46dd7922da (patch)
tree2dbbe718ad42545bde6c9f7672387827c530550a /plugins/UserInfoEx/src/classMTime.cpp
parente190a7fde521bd6af9ea485cc730f854aaf38e11 (diff)
HCONTACT, part 3
git-svn-id: http://svn.miranda-ng.org/main/trunk@8081 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/classMTime.cpp')
-rw-r--r--plugins/UserInfoEx/src/classMTime.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/plugins/UserInfoEx/src/classMTime.cpp b/plugins/UserInfoEx/src/classMTime.cpp
index 5035d8eac9..190488b10a 100644
--- a/plugins/UserInfoEx/src/classMTime.cpp
+++ b/plugins/UserInfoEx/src/classMTime.cpp
@@ -423,20 +423,14 @@ void MTime::GetLocalTime(HCONTACT hContact)
* read and write time to miranda's database
*********************************************/
-int MTime::DBGetStamp (HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MTime::DBGetStamp (HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
- DWORD dwTimeStamp;
-
- if (hContact == INVALID_HANDLE_VALUE ||
- pszModule == NULL || pszModule[0] == 0 ||
- pszSetting == NULL || pszSetting[0] == 0)
- {
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE || pszModule == NULL || pszModule[0] == 0 || pszSetting == NULL || pszSetting[0] == 0) {
ZeroDate();
return 1;
}
- dwTimeStamp = db_get_dw(hContact, pszModule, pszSetting, 0);
-
+ DWORD dwTimeStamp = db_get_dw(hContact, pszModule, pszSetting, 0);
if (dwTimeStamp == 0) {
ZeroDate();
return 1;
@@ -448,11 +442,8 @@ int MTime::DBGetStamp (HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
int MTime::DBWriteStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
- if (hContact == INVALID_HANDLE_VALUE ||
- pszModule == NULL || pszModule[0] == 0 ||
- pszSetting == NULL || pszSetting[0] == 0)
- {
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE || pszModule == NULL || pszModule[0] == 0 || pszSetting == NULL || pszSetting[0] == 0)
return 1;
- }
+
return db_set_dw(hContact, pszModule, pszSetting, TimeStamp());
}