summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-03-25 12:38:24 +0200
committerTor Lillqvist <tml@iki.fi>2013-03-26 19:01:38 +0200
commitf222e81cb88bc211076d92f52abed3349d3f4806 (patch)
tree823fc05634e496ae786696e9882386d81856be4b /tools
parentAdd to the project some source files where breakpoints are often useful (diff)
downloadcore-f222e81cb88bc211076d92f52abed3349d3f4806.tar.gz
core-f222e81cb88bc211076d92f52abed3349d3f4806.zip
Change how Rectangles are printed, special case for EMPTY
Change-Id: I0fe230875e785b811ae09e04399790a53b354dd6
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/gen.hxx7
1 files 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<charT, traits> & operator <<(
std::basic_ostream<charT, traits> & 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