From 33953cc6a0fab6a91af293c6838f8a46dd7922da Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 14:42:51 +0000 Subject: HCONTACT, part 3 git-svn-id: http://svn.miranda-ng.org/main/trunk@8081 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/UserInfoEx/src/classMTime.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'plugins/UserInfoEx/src/classMTime.cpp') 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()); } -- cgit v1.2.3