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/pointf.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/libsample/pointf.cpp') diff --git a/tests/libsample/pointf.cpp b/tests/libsample/pointf.cpp index 2464c22bb..509863c41 100644 --- a/tests/libsample/pointf.cpp +++ b/tests/libsample/pointf.cpp @@ -33,6 +33,15 @@ PointF::PointF(double x, double y) : m_x(x), m_y(y) { } +void +PointF::midpoint(const PointF& other, PointF* midpoint) const +{ + if (!midpoint) + return; + midpoint->setX((m_x + other.m_x) / 2.0); + midpoint->setY((m_y + other.m_y) / 2.0); +} + void PointF::show() { -- cgit v1.2.3