From f222e81cb88bc211076d92f52abed3349d3f4806 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 25 Mar 2013 12:38:24 +0200 Subject: [PATCH] Change how Rectangles are printed, special case for EMPTY Change-Id: I0fe230875e785b811ae09e04399790a53b354dd6 --- tools/inc/tools/gen.hxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/inc/tools/gen.hxx b/tools/inc/tools/gen.hxx index 1819a90c7002..028d5043f845 100644 --- a/tools/inc/tools/gen.hxx +++ b/tools/inc/tools/gen.hxx @@ -679,8 +679,11 @@ template< typename charT, typename traits > inline std::basic_ostream & operator <<( std::basic_ostream & stream, const Rectangle& rectangle ) { - return stream << rectangle.getX() << ',' << rectangle.getY() << ' ' - << rectangle.getWidth() << 'x' << rectangle.getHeight(); + if (rectangle.IsEmpty()) + return stream << "EMPTY"; + else + return stream << rectangle.getWidth() << 'x' << rectangle.getHeight() + << "@(" << rectangle.getX() << ',' << rectangle.getY() << ")"; } #endif