Procházet zdrojové kódy

Fix operator definition for AreaCMP

Fabio Alessandrelli před 10 roky
rodič
revize
e1bfbcfd42
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1 1
      servers/physics/body_sw.h
  2. 1 1
      servers/physics_2d/body_2d_sw.h

+ 1 - 1
servers/physics/body_sw.h

@@ -85,7 +85,7 @@ class BodySW : public CollisionObjectSW {
 
 		AreaSW *area;
 		_FORCE_INLINE_ bool operator==(const AreaCMP& p_cmp) const { return area->get_self() == p_cmp.area->get_self();}
-		_FORCE_INLINE_ bool operator<(const AreaCMP a) const { return area->get_priority() < a.area->get_priority();}
+		_FORCE_INLINE_ bool operator<(const AreaCMP& p_cmp) const { return area->get_priority() < p_cmp.area->get_priority();}
 		_FORCE_INLINE_ AreaCMP() {}
 		_FORCE_INLINE_ AreaCMP(AreaSW *p_area) { area=p_area;}
 	};

+ 1 - 1
servers/physics_2d/body_2d_sw.h

@@ -92,7 +92,7 @@ class Body2DSW : public CollisionObject2DSW {
 
 		Area2DSW *area;
 		_FORCE_INLINE_ bool operator==(const AreaCMP& p_cmp) const { return area->get_self() == p_cmp.area->get_self();}
-		_FORCE_INLINE_ bool operator<(const AreaCMP a) const { return area->get_priority() < a.area->get_priority();}
+		_FORCE_INLINE_ bool operator<(const AreaCMP& p_cmp) const { return area->get_priority() < p_cmp.area->get_priority();}
 		_FORCE_INLINE_ AreaCMP() {}
 		_FORCE_INLINE_ AreaCMP(Area2DSW *p_area) { area=p_area;}
 	};