From 0fac9e9fd54aecd1a712c85ddde1b84306cfe5a1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 8 Oct 2018 13:56:32 +0300 Subject: code cleaning --- plugins/Import/src/utils.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'plugins/Import/src') diff --git a/plugins/Import/src/utils.cpp b/plugins/Import/src/utils.cpp index 7ae0567580..ab2cd0a3e6 100644 --- a/plugins/Import/src/utils.cpp +++ b/plugins/Import/src/utils.cpp @@ -48,14 +48,6 @@ int CreateGroup(const wchar_t *group, MCONTACT hContact) return 1; } -static bool IsEqualEvent(const DBEVENTINFO &ev1, const DBEVENTINFO &ev2) -{ - return (ev1.timestamp == ev2.timestamp && - ev1.eventType == ev2.eventType && - ev1.cbBlob == ev2.cbBlob && - (ev1.flags & DBEF_SENT) == (ev2.flags & DBEF_SENT)); -} - // Returns TRUE if the event already exist in the database bool IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei) { @@ -109,7 +101,7 @@ bool IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei) memset(&dbeiExisting, 0, sizeof(dbeiExisting)); db_event_get(hPreviousDbEvent, &dbeiExisting); - if (IsEqualEvent(dbei, dbeiExisting)) + if (dbei == dbeiExisting) return TRUE; // find event with another timestamp @@ -146,7 +138,7 @@ bool IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei) } // Compare event with import candidate - if (IsEqualEvent(dbei, dbeiExisting)) { + if (dbei == dbeiExisting) { // remember event hPreviousDbEvent = hExistingDbEvent; dwPreviousTimeStamp = dbeiExisting.timestamp; @@ -171,7 +163,7 @@ bool IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei) } // Compare event with import candidate - if (IsEqualEvent(dbei, dbeiExisting)) { + if (dbei == dbeiExisting) { // remember event hPreviousDbEvent = hExistingDbEvent; dwPreviousTimeStamp = dbeiExisting.timestamp; -- cgit v1.2.3