From: Mikko Rasa Date: Sun, 12 Jan 2014 12:11:59 +0000 (+0200) Subject: Initialize slot even when unused to silence optimizer warnings X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=aa4d25153b806a657ac3b4b0f2711f2a126f39b7 Initialize slot even when unused to silence optimizer warnings --- diff --git a/source/bindable.h b/source/bindable.h index 8651c70e..8ea78034 100644 --- a/source/bindable.h +++ b/source/bindable.h @@ -100,6 +100,7 @@ private: void init(const T *o) { cleanup = (o ? &unbind : 0); + slot = 0; if(o) o->bind(); else @@ -168,6 +169,7 @@ private: void init(T *o) { old = T::current(); + slot = 0; cleanup = (o!=old ? &restore : 0); if(o) o->bind();