diff options
author | George Hazan <ghazan@miranda.im> | 2023-04-10 18:50:46 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-04-10 18:50:46 +0300 |
commit | 90ac4c689e1322b48f6ca53a0c8fff81daf73c9c (patch) | |
tree | 63e000a99864d819650634fe8a7fa8b2be0cd1d2 /include | |
parent | 79ac0acda98f8f7a34bde30b7720a11c04281cb4 (diff) |
code cleaning
Diffstat (limited to 'include')
-rw-r--r-- | include/m_database.h | 17 |
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; }
};
/////////////////////////////////////////////////////////////////////////////////////////
|