From 6bb2780c978d93b6ebe7b423adda27e4292467f2 Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Tue, 2 Aug 2011 13:06:58 -0300 Subject: Added test for removed pointer out argument. --- tests/libsample/point.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/libsample/point.cpp') diff --git a/tests/libsample/point.cpp b/tests/libsample/point.cpp index 484e7c11c..61e2830e4 100644 --- a/tests/libsample/point.cpp +++ b/tests/libsample/point.cpp @@ -33,6 +33,15 @@ Point::Point(double x, double y) : m_x(x), m_y(y) { } +void +Point::midpoint(const Point& other, Point* midpoint) const +{ + if (!midpoint) + return; + midpoint->setX((m_x + other.m_x) / 2.0); + midpoint->setY((m_y + other.m_y) / 2.0); +} + Point* Point::copy() const { -- cgit v1.2.3