(svn r8982) [cpp_gui] -Codechange: when moving Point by given offset, the offset can now be of different type (i.e. int16 vs. int32)
--- 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);