summaryrefslogtreecommitdiff
path: root/include/m_database.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/m_database.h')
-rw-r--r--include/m_database.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/include/m_database.h b/include/m_database.h
index 14c0c9fa1b..157046603f 100644
--- a/include/m_database.h
+++ b/include/m_database.h
@@ -681,17 +681,16 @@ namespace DB
/////////////////////////////////////////////////////////////////////////////////////////
// Helper to free event contents automatically
- struct EventInfo : public DBEVENTINFO
+ class MIR_APP_EXPORT EventInfo : public DBEVENTINFO, public MNonCopyable
{
- __forceinline explicit EventInfo()
- {
- memset(this, 0, sizeof(*this));
- }
+ bool bValid;
- __forceinline ~EventInfo()
- {
- mir_free(pBlob);
- }
+ public:
+ explicit EventInfo();
+ explicit EventInfo(MEVENT, bool bFetchBlob = true);
+ ~EventInfo();
+
+ __forceinline operator bool() const { return bValid; }
};
/////////////////////////////////////////////////////////////////////////////////////////