From 96493dcae9e7b3cc99977b052d95f70e192dd567 Mon Sep 17 00:00:00 2001 From: Ryan Leavengood Date: Fri, 8 Jun 2007 05:04:33 +0000 Subject: [PATCH] Better name: result becomes lines. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21348 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/screen_savers/message/Message.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/add-ons/screen_savers/message/Message.cpp b/src/add-ons/screen_savers/message/Message.cpp index b9982c53cf..393d1503ad 100644 --- a/src/add-ons/screen_savers/message/Message.cpp +++ b/src/add-ons/screen_savers/message/Message.cpp @@ -259,10 +259,11 @@ Message::Draw(BView *view, int32 frame) font.GetHeight(&fontHeight); float lineHeight = fontHeight.ascent + fontHeight.descent + fontHeight.leading; - BString **result = NULL; + BString **lines = NULL; int longestLine = 0; - int count = get_lines(origMessage, &result, &longestLine); - float stringWidth = font.StringWidth(result[longestLine]->String()); + int count = get_lines(origMessage, &lines, &longestLine); + + float stringWidth = font.StringWidth(lines[longestLine]->String()); BRect box(0, 0, stringWidth + 20, (lineHeight * count) + 20); box.OffsetTo((width - box.Width()) / 2, height - box.Height() - 40); @@ -275,11 +276,11 @@ Message::Draw(BView *view, int32 frame) start.x += 10; start.y += 10 + fontHeight.ascent + fontHeight.leading; for (int i = 0; i < count; i++) { - offscreen.DrawString(result[i]->String(), start); + offscreen.DrawString(lines[i]->String(), start); start.y += lineHeight; - delete result[i]; + delete lines[i]; } - delete[] result; + delete[] lines; } delete origMessage;