Bladeren bron

Only refactored declaration and assignment together, no functionality change.

mingodad 13 jaren geleden
bovenliggende
commit
051a3e2de6
1 gewijzigde bestanden met toevoegingen van 6 en 10 verwijderingen
  1. 6 10
      squirrel/sqobject.h

+ 6 - 10
squirrel/sqobject.h

@@ -262,11 +262,9 @@ struct SQObjectPtr : public SQObject
 	}
 	}
 			
 			
 	inline SQObjectPtr& operator=(const SQObjectPtr& obj)
 	inline SQObjectPtr& operator=(const SQObjectPtr& obj)
-	{ 
-		SQObjectType tOldType;
-		SQObjectValue unOldVal;
-		tOldType=_type;
-		unOldVal=_unVal;
+	{
+		SQObjectType tOldType =_type;
+		SQObjectValue unOldVal =_unVal;
 		_unVal = obj._unVal;
 		_unVal = obj._unVal;
 		_type = obj._type;
 		_type = obj._type;
 		__AddRef(_type,_unVal);
 		__AddRef(_type,_unVal);
@@ -274,11 +272,9 @@ struct SQObjectPtr : public SQObject
 		return *this;
 		return *this;
 	}
 	}
 	inline SQObjectPtr& operator=(const SQObject& obj)
 	inline SQObjectPtr& operator=(const SQObject& obj)
-	{ 
-		SQObjectType tOldType;
-		SQObjectValue unOldVal;
-		tOldType=_type;
-		unOldVal=_unVal;
+	{
+		SQObjectType tOldType =_type;
+		SQObjectValue unOldVal =_unVal;
 		_unVal = obj._unVal;
 		_unVal = obj._unVal;
 		_type = obj._type;
 		_type = obj._type;
 		__AddRef(_type,_unVal);
 		__AddRef(_type,_unVal);