Browse Source

replace pt with pointer

David Rose 24 years ago
parent
commit
ead5bf92d1
2 changed files with 16 additions and 16 deletions
  1. 13 13
      panda/src/tform/mouseWatcherGroup.cxx
  2. 3 3
      panda/src/tform/mouseWatcherGroup.h

+ 13 - 13
panda/src/tform/mouseWatcherGroup.cxx

@@ -38,20 +38,20 @@ MouseWatcherGroup::
 //               added, or false if it was already on the list.
 //               added, or false if it was already on the list.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool MouseWatcherGroup::
 bool MouseWatcherGroup::
-add_region(PT(MouseWatcherRegion) region) {
+add_region(MouseWatcherRegion *region) {
   //return _regions.insert(region).second;
   //return _regions.insert(region).second;
 
 
   // See if the region is in the set/vector already
   // See if the region is in the set/vector already
-  Regions::const_iterator ri = find(_regions.begin(), 
-                                    _regions.end(), 
-                                    region);
+  PT(MouseWatcherRegion) pt = region;
+  Regions::const_iterator ri = 
+    find(_regions.begin(), _regions.end(), pt);
   if (ri != _regions.end()) {
   if (ri != _regions.end()) {
     // Already in the set, return false
     // Already in the set, return false
     return false;
     return false;
   }
   }
 
 
   // Not in the set, add it and return true
   // Not in the set, add it and return true
-  _regions.push_back(region);
+  _regions.push_back(pt);
   return true;
   return true;
 }
 }
 
 
@@ -62,11 +62,11 @@ add_region(PT(MouseWatcherRegion) region) {
 //               added to the MouseWatcherGroup, false otherwise.
 //               added to the MouseWatcherGroup, false otherwise.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool MouseWatcherGroup::
 bool MouseWatcherGroup::
-has_region(PT(MouseWatcherRegion) region) const {
+has_region(MouseWatcherRegion *region) const {
   // See if the region is in the set/vector
   // See if the region is in the set/vector
-  Regions::const_iterator ri = find(_regions.begin(),
-                              _regions.end(),
-                              region);
+  PT(MouseWatcherRegion) pt = region;
+  Regions::const_iterator ri = 
+    find(_regions.begin(), _regions.end(), pt);
   if (ri != _regions.end()) {
   if (ri != _regions.end()) {
     // Found it
     // Found it
     return true;
     return true;
@@ -83,13 +83,13 @@ has_region(PT(MouseWatcherRegion) region) const {
 //               if it wasn't there in the first place.
 //               if it wasn't there in the first place.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool MouseWatcherGroup::
 bool MouseWatcherGroup::
-remove_region(PT(MouseWatcherRegion) region) {
+remove_region(MouseWatcherRegion *region) {
   //return _regions.erase(region) != 0;
   //return _regions.erase(region) != 0;
 
 
   // See if the region is in the set/vector
   // See if the region is in the set/vector
-  Regions::iterator ri = find(_regions.begin(),
-                              _regions.end(),
-                              region);
+  PT(MouseWatcherRegion) pt = region;
+  Regions::iterator ri = 
+    find(_regions.begin(), _regions.end(), pt);
   if (ri != _regions.end()) {
   if (ri != _regions.end()) {
     // Found it, now erase it
     // Found it, now erase it
     _regions.erase(ri);
     _regions.erase(ri);

+ 3 - 3
panda/src/tform/mouseWatcherGroup.h

@@ -36,9 +36,9 @@ public:
   virtual ~MouseWatcherGroup();
   virtual ~MouseWatcherGroup();
 
 
 PUBLISHED:
 PUBLISHED:
-  bool add_region(PT(MouseWatcherRegion) region);
-  bool has_region(PT(MouseWatcherRegion) region) const;
-  bool remove_region(PT(MouseWatcherRegion) region);
+  bool add_region(MouseWatcherRegion *region);
+  bool has_region(MouseWatcherRegion *region) const;
+  bool remove_region(MouseWatcherRegion *region);
   MouseWatcherRegion *find_region(const string &name) const;
   MouseWatcherRegion *find_region(const string &name) const;
   void clear_regions();
   void clear_regions();