summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbintf.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-31 14:38:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-31 14:38:25 +0000
commit1e31191afc0fbaeb211bc1f2c250ee155d21d0c0 (patch)
treede23ba08b6844791c8500c4f500129b27771939e /plugins/Db3x_mmap/src/dbintf.h
parent9832b02f72a26c28e65ef4f281c16e684618d2b8 (diff)
inline method markedRead() introduced instead of bits magic
git-svn-id: http://svn.miranda-ng.org/main/trunk@8807 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/dbintf.h')
-rw-r--r--plugins/Db3x_mmap/src/dbintf.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h
index 9582c928bb..88483226f1 100644
--- a/plugins/Db3x_mmap/src/dbintf.h
+++ b/plugins/Db3x_mmap/src/dbintf.h
@@ -60,6 +60,8 @@ DBHeader
#define DBVT_ENCRYPTED 250
#define DBVT_UNENCRYPTED 251
+#define MARKED_READ (DBEF_READ | DBEF_SENT)
+
#define NeedBytes(n) if (bytesRemaining<(n)) pBlob = (PBYTE)DBRead(ofsBlobPtr,(n),&bytesRemaining)
#define MoveAlong(n) {int x = n; pBlob += (x); ofsBlobPtr += (x); bytesRemaining -= (x);}
@@ -163,6 +165,10 @@ struct DBEvent
WORD wEventType; // module-defined event type
DWORD cbBlob; // number of bytes in the blob
BYTE blob[1]; // the blob. module-defined formatting
+
+ bool __forceinline markedRead() const
+ { return (flags & MARKED_READ) != 0;
+ }
};
#include <poppack.h>