]> git.mxchange.org Git - simgear.git/commitdiff
Fix GPS activation on Windows.
authorJames Turner <zakalawe@mac.com>
Mon, 21 Oct 2013 23:42:31 +0000 (00:42 +0100)
committerJames Turner <zakalawe@mac.com>
Mon, 21 Oct 2013 23:42:31 +0000 (00:42 +0100)
Bug 1190, fix route-manager -> GPS activation on Windows
(and probably a couple of unrelated issues).
SGPropertyChangeCallback was missing a suitable copy-constructor,
leading to incorrect behaviour on compilers where the operation
is not elided. Such as MSVC.

simgear/props/props.hxx

index c78d21026d695e37b1409c38997f2995829ad54b..8ec6100043c11b4dee12283f25369dae32e2c4ab 100644 (file)
@@ -2056,6 +2056,13 @@ public:
     {
         _property->addChangeListener(this,initial);
     }
+
+       SGPropertyChangeCallback(const SGPropertyChangeCallback<T>& other) :
+               _obj(other._obj), _callback(other._callback), _property(other._property)
+       {
+                _property->addChangeListener(this,false);
+       }
+
     virtual ~SGPropertyChangeCallback()
     {
         _property->removeChangeListener(this);