]> git.tdb.fi Git - libs/gl.git/commitdiff
Initialize slot even when unused to silence optimizer warnings
authorMikko Rasa <tdb@tdb.fi>
Sun, 12 Jan 2014 12:11:59 +0000 (14:11 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 12 Jan 2014 12:11:59 +0000 (14:11 +0200)
source/bindable.h

index 8651c70ee066b6cbfa2e8f40cd967b0a92f148cd..8ea78034794f85c972a1bc43a88040ae9d4ceaa2 100644 (file)
@@ -100,6 +100,7 @@ private:
        void init(const T *o)
        {
                cleanup = (o ? &unbind<T> : 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<T> : 0);
                if(o)
                        o->bind();