mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Enforce RsEvent not being instantiable without inheriting
This commit is contained in:
parent
5554f799c0
commit
9aa116b885
@ -59,11 +59,13 @@ enum class RsEventType : uint32_t
|
||||
*/
|
||||
struct RsEvent : RsSerializable
|
||||
{
|
||||
RsEvent() = delete;
|
||||
protected:
|
||||
RsEvent(RsEventType type) :
|
||||
mType(type), mTimePoint(std::chrono::system_clock::now()) {}
|
||||
virtual ~RsEvent();
|
||||
|
||||
RsEvent() = delete;
|
||||
|
||||
public:
|
||||
RsEventType mType;
|
||||
std::chrono::system_clock::time_point mTimePoint;
|
||||
|
||||
@ -81,6 +83,8 @@ struct RsEvent : RsSerializable
|
||||
RS_SERIAL_PROCESS(mTime);
|
||||
mTimePoint = std::chrono::system_clock::from_time_t(mTime);
|
||||
}
|
||||
|
||||
virtual ~RsEvent();
|
||||
};
|
||||
|
||||
typedef uint32_t RsEventsHandlerId_t;
|
||||
|
Loading…
Reference in New Issue
Block a user