]> git.sesse.net Git - vlc/commitdiff
* modules/gui/skins2/*: Use ARG instead of ARG* as a template argument
authorOlivier Teulière <ipkiss@videolan.org>
Sun, 4 Jun 2006 14:17:46 +0000 (14:17 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Sun, 4 Jun 2006 14:17:46 +0000 (14:17 +0000)
modules/gui/skins2/controls/ctrl_tree.cpp
modules/gui/skins2/controls/ctrl_tree.hpp
modules/gui/skins2/utils/observer.hpp
modules/gui/skins2/utils/var_tree.hpp

index 5ad257af4fa5457ec15b1a01a6cc8df9ea2fdb43..66ea7a60fd8da486a78bb12a14f7a5bc457f1836 100644 (file)
@@ -140,7 +140,7 @@ int CtrlTree::maxItems()
 }
 
 
-void CtrlTree::onUpdate( Subject<VarTree, tree_update*> &rTree,
+void CtrlTree::onUpdate( Subject<VarTree, tree_update> &rTree,
                          tree_update *arg )
 {
     if( arg->i_type == 0 ) // Item update
index 26e6439173609bc34f5d820381cb3f5c594cd5fd..da3ccd785ba5ecdddc2cc2325e5cf31aa5b8b7be 100644 (file)
@@ -33,7 +33,7 @@ class GenericFont;
 class GenericBitmap;
 
 /// Class for control tree
-class CtrlTree: public CtrlGeneric, public Observer<VarTree, tree_update*>,
+class CtrlTree: public CtrlGeneric, public Observer<VarTree, tree_update>,
     public Observer<VarPercent>
 {
     public:
@@ -119,7 +119,7 @@ class CtrlTree: public CtrlGeneric, public Observer<VarTree, tree_update*>,
         bool m_flat;
 
         /// Method called when the tree variable is modified
-        virtual void onUpdate( Subject<VarTree, tree_update*> &rTree ,
+        virtual void onUpdate( Subject<VarTree, tree_update> &rTree ,
                                tree_update *);
 
         // Method called when the position variable of the tree is modified
index 7320d32b6672f009ec9b7b8ddd5140c3a2272e1d..fa3023a7d25c5c528e1b084f3c9aba91f48a9218 100644 (file)
@@ -32,7 +32,7 @@ template <class S, class ARG> class Observer;
 
 
 /// Template for subjects in the Observer design pattern
-template <class S, class ARG = void*> class Subject
+template <class S, class ARG = void> class Subject
 {
     public:
         virtual ~Subject() {}
@@ -58,7 +58,7 @@ template <class S, class ARG = void*> class Subject
         }
 
         /// Notify the observers when the status has changed
-        virtual void notify( ARG arg )
+        virtual void notify( ARG *arg )
         {
             // This stupid gcc 3.2 needs "typename"
             typename set<Observer<S, ARG>*>::const_iterator iter;
@@ -87,13 +87,13 @@ template <class S, class ARG = void*> class Subject
 
 
 /// Template for observers in the Observer design pattern
-template <class S, class ARG = void*> class Observer
+template <class S, class ARG = void> class Observer
 {
     public:
         virtual ~Observer() {}
 
         /// Method called when the subject is modified
-        virtual void onUpdate( Subject<S,ARG> &rSubject , ARG arg) = 0;
+        virtual void onUpdate( Subject<S, ARG> &rSubject, ARG *arg) = 0;
 
     protected:
         Observer() {}
index f7a8560e187c2b1cc54c79e85d805b608942ab0b..a343662069c9f35ce7735c858508a15c7e46c8b1 100644 (file)
@@ -42,7 +42,7 @@ typedef struct tree_update
 } tree_update;
 
 /// Tree variable
-class VarTree: public Variable, public Subject<VarTree, tree_update*>
+class VarTree: public Variable, public Subject<VarTree, tree_update>
 {
     public:
         VarTree( intf_thread_t *pIntf );