init Callback completely always

The `token` pointer was left dangerously uninitialized after construction.
This commit is contained in:
mjk 2021-03-22 13:43:13 +00:00 committed by LAGonauta
parent 0258980977
commit 934b492357

View file

@ -30,11 +30,11 @@ public:
Callback(T callback, void* context, void(*free)(void*))
{
this->callback = callback;
this->free = free;
this->context = context;
}
: token {}
, callback{callback}
, context {context}
, free {free}
{}
~Callback()
{