From 957320d114cc1fa11882fd40fd73629469a63bed Mon Sep 17 00:00:00 2001 From: Adi Oanca Date: Mon, 15 Sep 2003 19:07:45 +0000 Subject: [PATCH] * Minor changes due to the fact that LayerData::font member is allocated on stack now... git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4686 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/server/AccelerantDriver.cpp | 12 ++++++------ src/servers/app/server/BitmapDriver.cpp | 12 ++++++------ src/servers/app/server/ScreenDriver.cpp | 16 ++++++++-------- src/servers/app/server/ViewDriver.cpp | 16 ++++++++-------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/servers/app/server/AccelerantDriver.cpp b/src/servers/app/server/AccelerantDriver.cpp index 12c1a85721..ca05163ba9 100644 --- a/src/servers/app/server/AccelerantDriver.cpp +++ b/src/servers/app/server/AccelerantDriver.cpp @@ -349,14 +349,14 @@ void AccelerantDriver::DrawBitmap(ServerBitmap *bmp, BRect src, BRect dest, Laye */ void AccelerantDriver::DrawString(const char *string, int32 length, BPoint pt, LayerData *d, escapement_delta *edelta) { - if(!string || !d || !d->font) + if(!string || !d) return; Lock(); pt.y--; // because of Be's backward compatibility hack - ServerFont *font=d->font; + ServerFont *font=&(d->font); FontStyle *style=font->Style(); if(!style) @@ -2479,11 +2479,11 @@ bool AccelerantDriver::DumpToFile(const char *path) */ float AccelerantDriver::StringWidth(const char *string, int32 length, LayerData *d) { - if(!string || !d || !d->font) + if(!string || !d) return 0.0; Lock(); - ServerFont *font=d->font; + ServerFont *font=&(d->font); FontStyle *style=font->Style(); if(!style) @@ -2564,11 +2564,11 @@ float AccelerantDriver::StringWidth(const char *string, int32 length, LayerData */ float AccelerantDriver::StringHeight(const char *string, int32 length, LayerData *d) { - if(!string || !d || !d->font) + if(!string || !d) return 0.0; Lock(); - ServerFont *font=d->font; + ServerFont *font=&(d->font); FontStyle *style=font->Style(); if(!style) diff --git a/src/servers/app/server/BitmapDriver.cpp b/src/servers/app/server/BitmapDriver.cpp index 441e1c6e72..70b741cb52 100644 --- a/src/servers/app/server/BitmapDriver.cpp +++ b/src/servers/app/server/BitmapDriver.cpp @@ -1502,11 +1502,11 @@ void BitmapDriver::InvertRect(BRect r) float BitmapDriver::StringWidth(const char *string, int32 length, LayerData *d) { - if(!string || !d || !d->font) + if(!string || !d ) return 0.0; Lock(); - ServerFont *font=d->font; + ServerFont *font=&(d->font); FontStyle *style=font->Style(); if(!style) @@ -1575,11 +1575,11 @@ float BitmapDriver::StringWidth(const char *string, int32 length, LayerData *d) float BitmapDriver::StringHeight(const char *string, int32 length, LayerData *d) { - if(!string || !d || !d->font) + if(!string || !d) return 0.0; Lock(); - ServerFont *font=d->font; + ServerFont *font=&(d->font); FontStyle *style=font->Style(); if(!style) @@ -1646,14 +1646,14 @@ float BitmapDriver::StringHeight(const char *string, int32 length, LayerData *d) */ void BitmapDriver::DrawString(const char *string, int32 length, BPoint pt, LayerData *d, escapement_delta *edelta) { - if(!string || !d || !d->font) + if(!string || !d) return; Lock(); pt.y--; // because of Be's backward compatibility hack - ServerFont *font=d->font; + ServerFont *font=&(d->font); FontStyle *style=font->Style(); if(!style) diff --git a/src/servers/app/server/ScreenDriver.cpp b/src/servers/app/server/ScreenDriver.cpp index 2d2762b528..6f3d550b3f 100644 --- a/src/servers/app/server/ScreenDriver.cpp +++ b/src/servers/app/server/ScreenDriver.cpp @@ -867,12 +867,12 @@ void ScreenDriver::SetLayerData(LayerData *d, bool set_font_data) if(set_font_data) { BFont font; - ServerFont *sf=d->font; + ServerFont *sf=&(d->font); if(!sf) return; - FontStyle *style=d->font->Style(); + FontStyle *style=d->font.Style(); if(!style) return; @@ -896,11 +896,11 @@ void ScreenDriver::SetLayerData(LayerData *d, bool set_font_data) float ScreenDriver::StringWidth(const char *string, int32 length, LayerData *d) { - if(!string || !d || !d->font) + if(!string || !d) return 0.0; screenwin->Lock(); - ServerFont *font=d->font; + ServerFont *font=&(d->font); FontStyle *style=font->Style(); if(!style) @@ -960,11 +960,11 @@ float ScreenDriver::StringWidth(const char *string, int32 length, LayerData *d) float ScreenDriver::StringHeight(const char *string, int32 length, LayerData *d) { - if(!string || !d || !d->font) + if(!string || !d) return 0.0; screenwin->Lock(); - ServerFont *font=d->font; + ServerFont *font=&(d->font); FontStyle *style=font->Style(); if(!style) @@ -1010,13 +1010,13 @@ float ScreenDriver::StringHeight(const char *string, int32 length, LayerData *d) void ScreenDriver::DrawString(const char *string, int32 length, BPoint pt, LayerData *d, escapement_delta *edelta) { - if(!string || !d || !d->font) + if(!string || !d) return; screenwin->Lock(); pt.y--; // because of Be's backward compatibility hack - ServerFont *font=d->font; + ServerFont *font=&(d->font); FontStyle *style=font->Style(); if(!style) diff --git a/src/servers/app/server/ViewDriver.cpp b/src/servers/app/server/ViewDriver.cpp index 1584384010..0f1d9e28a0 100644 --- a/src/servers/app/server/ViewDriver.cpp +++ b/src/servers/app/server/ViewDriver.cpp @@ -1181,12 +1181,12 @@ void ViewDriver::SetLayerData(LayerData *d, bool set_font_data) if(set_font_data) { BFont font; - ServerFont *sf=d->font; + ServerFont *sf=&(d->font); if(!sf) return; - FontStyle *style=d->font->Style(); + FontStyle *style=d->font.Style(); if(!style) return; @@ -1210,11 +1210,11 @@ void ViewDriver::SetLayerData(LayerData *d, bool set_font_data) float ViewDriver::StringWidth(const char *string, int32 length, LayerData *d) { - if(!string || !d || !d->font) + if(!string || !d ) return 0.0; screenwin->Lock(); - ServerFont *font=d->font; + ServerFont *font=&(d->font); FontStyle *style=font->Style(); if(!style) @@ -1274,11 +1274,11 @@ float ViewDriver::StringWidth(const char *string, int32 length, LayerData *d) float ViewDriver::StringHeight(const char *string, int32 length, LayerData *d) { - if(!string || !d || !d->font) + if(!string || !d ) return 0.0; screenwin->Lock(); - ServerFont *font=d->font; + ServerFont *font=&(d->font); FontStyle *style=font->Style(); if(!style) @@ -1324,13 +1324,13 @@ float ViewDriver::StringHeight(const char *string, int32 length, LayerData *d) void ViewDriver::DrawString(const char *string, int32 length, BPoint pt, LayerData *d, escapement_delta *edelta) { - if(!string || !d || !d->font) + if(!string || !d ) return; screenwin->Lock(); pt.y--; // because of Be's backward compatibility hack - ServerFont *font=d->font; + ServerFont *font=&(d->font); FontStyle *style=font->Style(); if(!style)