Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…and &operator=(Callback<Result, Cookie> &aCallback).
  • Loading branch information...
commit 0859f84d76978da9705ff8745498d4f2bcd8af13 1 parent 57e492e
Andreas Zelend ace20022 authored
Showing with 2 additions and 12 deletions.
  1. +2 −12 xbmc/guilib/GUICallback.h
14 xbmc/guilib/GUICallback.h
View
@@ -55,16 +55,11 @@ class GUIEvent
// Assign an EventHandler (EventHandler's are derived from Event)
GUIEvent<Cookie> &operator=(GUIEvent<Cookie> &aEvent)
{
- if (&aEvent)
+ if (&aEvent != this)
{
m_pInstance = aEvent.m_pInstance;
m_pMethod = aEvent.m_pMethod;
}
- else
- {
- GUIEvent();
- }
-
return *this;
}
@@ -136,16 +131,11 @@ class Callback
// Assign a CallbackHandler (CallbackHandler's are derived from Callback)
Callback<Result, Cookie> &operator=(Callback<Result, Cookie> &aCallback)
{
- if (&aCallback)
+ if (&aCallback != this)
{
m_pInstance = aCallback.m_pInstance;
m_pMethod = aCallback.m_pMethod;
}
- else
- {
- Callback();
- }
-
return *this;
}
Please sign in to comment.
Something went wrong with that request. Please try again.