Skip to content
This repository
Browse code

[GUICallback] Correct operators &operator=(GUIEvent<Cookie> &aEvent) …

…and &operator=(Callback<Result, Cookie> &aCallback).
  • Loading branch information...
commit 0859f84d76978da9705ff8745498d4f2bcd8af13 1 parent 57e492e
Andreas Zelend authored August 25, 2013

Showing 1 changed file with 2 additions and 12 deletions. Show diff stats Hide diff stats

  1. 14  xbmc/guilib/GUICallback.h
14  xbmc/guilib/GUICallback.h
@@ -55,16 +55,11 @@ class GUIEvent
55 55
   // Assign an EventHandler (EventHandler's are derived from Event)
56 56
   GUIEvent<Cookie> &operator=(GUIEvent<Cookie> &aEvent)
57 57
   {
58  
-    if (&aEvent)
  58
+    if (&aEvent != this)
59 59
     {
60 60
       m_pInstance = aEvent.m_pInstance;
61 61
       m_pMethod = aEvent.m_pMethod;
62 62
     }
63  
-    else
64  
-    {
65  
-      GUIEvent();
66  
-    }
67  
-
68 63
     return *this;
69 64
   }
70 65
 
@@ -136,16 +131,11 @@ class Callback
136 131
   // Assign a CallbackHandler (CallbackHandler's are derived from Callback)
137 132
   Callback<Result, Cookie> &operator=(Callback<Result, Cookie> &aCallback)
138 133
   {
139  
-    if (&aCallback)
  134
+    if (&aCallback != this)
140 135
     {
141 136
       m_pInstance = aCallback.m_pInstance;
142 137
       m_pMethod = aCallback.m_pMethod;
143 138
     }
144  
-    else
145  
-    {
146  
-      Callback();
147  
-    }
148  
-
149 139
     return *this;
150 140
   }
151 141
 

0 notes on commit 0859f84

Please sign in to comment.
Something went wrong with that request. Please try again.