From 849683f4c8d4b83e80aa6344fa634c1f21b57f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sun, 28 Apr 2013 16:12:32 +0200 Subject: [PATCH] app_server: workaround for GCC 4.7 misbehavior in IntRect. * moved the inlined BRect constructor of IntRect to the cpp file. GCC will inline the method anyway. * impacted methods were both AGGTextRenderer::RenderString() in src/servers/app/drawing/Painter/AGGTextRenderer.cpp, calling the StringRenderer constructor with a BRect reference. * unless someone comes up with an explanation, I'll try to come with a smaller testcase to submit this problem upstream. --- src/servers/app/IntRect.cpp | 9 +++++++++ src/servers/app/IntRect.h | 10 ---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/servers/app/IntRect.cpp b/src/servers/app/IntRect.cpp index 7c9a53d4c0..c72433bc67 100644 --- a/src/servers/app/IntRect.cpp +++ b/src/servers/app/IntRect.cpp @@ -12,6 +12,15 @@ #include +IntRect::IntRect(const BRect &r) +{ + left = (int32)r.left; + top = (int32)r.top; + right = (int32)r.right; + bottom = (int32)r.bottom; +} + + void IntRect::SetLeftTop(const IntPoint& p) { diff --git a/src/servers/app/IntRect.h b/src/servers/app/IntRect.h index f273bb8172..a6f01f3f10 100644 --- a/src/servers/app/IntRect.h +++ b/src/servers/app/IntRect.h @@ -149,16 +149,6 @@ IntRect::IntRect(const IntRect &r) } -inline -IntRect::IntRect(const BRect &r) -{ - left = (int32)r.left; - top = (int32)r.top; - right = (int32)r.right; - bottom = (int32)r.bottom; -} - - inline IntRect::IntRect(const IntPoint& leftTop, const IntPoint& rightBottom) {