]> git.tdb.fi Git - libs/gl.git/commitdiff
Make older gcc versions happy
authorMikko Rasa <tdb@tdb.fi>
Mon, 16 Jun 2014 20:08:26 +0000 (23:08 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 16 Jun 2014 20:08:26 +0000 (23:08 +0300)
source/bindable.h

index 8ea78034794f85c972a1bc43a88040ae9d4ceaa2..8a5821b957cf4dd1569e3e840d6ad2ee8207e5ed 100644 (file)
@@ -99,7 +99,7 @@ private:
        template<typename T>
        void init(const T *o)
        {
-               cleanup = (o ? &unbind<T> : 0);
+               cleanup = (o ? static_cast<CleanupFunc *>(&unbind<T>) : 0);
                slot = 0;
                if(o)
                        o->bind();
@@ -110,7 +110,7 @@ private:
        template<typename T, typename S>
        void init(const T *o, S s)
        {
-               cleanup = (o ? &unbind_from<T, S> : 0);
+               cleanup = (o ? static_cast<CleanupFunc *>(&unbind_from<T, S>) : 0);
                slot = s;
                if(o)
                        o->bind_to(s);
@@ -170,7 +170,7 @@ private:
        {
                old = T::current();
                slot = 0;
-               cleanup = (o!=old ? &restore<T> : 0);
+               cleanup = (o!=old ? static_cast<CleanupFunc *>(&restore<T>) : 0);
                if(o)
                        o->bind();
                else if(old)
@@ -182,7 +182,7 @@ private:
        {
                old = T::current(s);
                slot = s;
-               cleanup = (o!=old ? &restore_to<T, S> : 0);
+               cleanup = (o!=old ? static_cast<CleanupFunc *>(&restore_to<T, S>) : 0);
                if(o)
                        o->bind_to(s);
                else if(old)