summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-10-08 13:56:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-10-08 13:56:32 +0300
commit0fac9e9fd54aecd1a712c85ddde1b84306cfe5a1 (patch)
tree0bdb1fb1985d3f7056b0d7ed3a951ced308b6815 /plugins
parenta9657437f9007340842330f87c262f90b65fab9c (diff)
code cleaning
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Import/src/utils.cpp14
1 files changed, 3 insertions, 11 deletions
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;