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*)) Callback(T callback, void* context, void(*free)(void*))
{ : token {}
this->callback = callback; , callback{callback}
this->free = free; , context {context}
this->context = context; , free {free}
} {}
~Callback() ~Callback()
{ {