X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbindable.h;h=8a5821b957cf4dd1569e3e840d6ad2ee8207e5ed;hb=4d7f66ea28c788e12f700216b9c53af9e71b8390;hp=8651c70ee066b6cbfa2e8f40cd967b0a92f148cd;hpb=02feac06937ec4e8e122a833b4903ccf0bd6d030;p=libs%2Fgl.git diff --git a/source/bindable.h b/source/bindable.h index 8651c70e..8a5821b9 100644 --- a/source/bindable.h +++ b/source/bindable.h @@ -99,7 +99,8 @@ private: template void init(const T *o) { - cleanup = (o ? &unbind : 0); + cleanup = (o ? static_cast(&unbind) : 0); + slot = 0; if(o) o->bind(); else @@ -109,7 +110,7 @@ private: template void init(const T *o, S s) { - cleanup = (o ? &unbind_from : 0); + cleanup = (o ? static_cast(&unbind_from) : 0); slot = s; if(o) o->bind_to(s); @@ -168,7 +169,8 @@ private: void init(T *o) { old = T::current(); - cleanup = (o!=old ? &restore : 0); + slot = 0; + cleanup = (o!=old ? static_cast(&restore) : 0); if(o) o->bind(); else if(old) @@ -180,7 +182,7 @@ private: { old = T::current(s); slot = s; - cleanup = (o!=old ? &restore_to : 0); + cleanup = (o!=old ? static_cast(&restore_to) : 0); if(o) o->bind_to(s); else if(old)