app_server: avoids referencing a temporary IntRect instance.

* GCC lets us use a const reference to a temporary, but using it after it disappeared
  is incorrect.
* reverts hrev45576 as this patch seems more correct.
This commit is contained in:
Jérôme Duval 2013-04-29 19:49:13 +02:00
parent ed08c5287a
commit d592954e3c
3 changed files with 14 additions and 11 deletions

View File

@ -12,15 +12,6 @@
#include <stdio.h>
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)
{

View File

@ -149,6 +149,16 @@ 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)
{

View File

@ -334,8 +334,9 @@ AGGTextRenderer::RenderString(const char* string, uint32 length,
// for when we bypass the transformation pipeline
BPoint transformOffset(0.0, 0.0);
transform.Transform(&transformOffset);
IntRect clippingIntFrame(clippingFrame);
StringRenderer renderer(clippingFrame, dryRun,
StringRenderer renderer(clippingIntFrame, dryRun,
gSubpixelAntialiasing && fAntialias,
transformedOutline, transformedContourOutline,
transform, transformOffset, nextCharPos, *this);
@ -369,8 +370,9 @@ AGGTextRenderer::RenderString(const char* string, uint32 length,
// for when we bypass the transformation pipeline
BPoint transformOffset(0.0, 0.0);
transform.Transform(&transformOffset);
IntRect clippingIntFrame(clippingFrame);
StringRenderer renderer(clippingFrame, dryRun,
StringRenderer renderer(clippingIntFrame, dryRun,
gSubpixelAntialiasing && fAntialias,
transformedOutline, transformedContourOutline,
transform, transformOffset, nextCharPos, *this);