(svn r8982) [cpp_gui] -Codechange: when moving Point by given offset, the offset can now be of different type (i.e. int16 vs. int32) cpp_gui
authorKUDr
Fri, 02 Mar 2007 22:29:20 +0000
branchcpp_gui
changeset 6274 35a9b459de19
parent 6273 d8a2c6844650
child 6275 bd57b30a8b81
(svn r8982) [cpp_gui] -Codechange: when moving Point by given offset, the offset can now be of different type (i.e. int16 vs. int32)
src/misc/rect.hpp
--- a/src/misc/rect.hpp	Fri Mar 02 21:21:41 2007 +0000
+++ b/src/misc/rect.hpp	Fri Mar 02 22:29:20 2007 +0000
@@ -52,19 +52,19 @@
 		PointRaw::y += dy;
 	}
 
-	void DoMove(const PointRaw &offset)
+	template <typename T2> void DoMove(const PointRawT<T2> &offset)
 	{
 		DoMove((T)offset.x, (T)offset.y);
 	}
 
-	PointT operator +(const PointRaw &offset) const
+	template <typename T2> PointT operator +(const PointRawT<T2> &offset) const
 	{
 		PointT pt(*this);
 		pt.DoMove(offset);
 		return pt;
 	}
 
-	PointT operator -(const PointRaw &offset) const
+	template <typename T2> PointT operator -(const PointRawT<T2> &offset) const
 	{
 		PointT pt(*this);
 		pt.DoMove(-offset);