From f5dc380d116430b94e2457163fde7be9d0d5ebba Mon Sep 17 00:00:00 2001 From: Clemens Zeidler Date: Tue, 21 Sep 2010 23:37:31 +0000 Subject: [PATCH] Fix warnings and some coding style issues. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38773 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tests/libs/alm/HelloWorld.cpp | 8 +++++--- src/tests/libs/alm/Pinwheel.cpp | 32 ++++++++++--------------------- src/tests/libs/alm/TwoViews.cpp | 8 ++------ 3 files changed, 17 insertions(+), 31 deletions(-) diff --git a/src/tests/libs/alm/HelloWorld.cpp b/src/tests/libs/alm/HelloWorld.cpp index 3459708741..79c5558db6 100644 --- a/src/tests/libs/alm/HelloWorld.cpp +++ b/src/tests/libs/alm/HelloWorld.cpp @@ -17,8 +17,9 @@ class HelloWorldWindow : public BWindow { public: HelloWorldWindow(BRect frame) - : BWindow(frame, "ALM Hello World", - B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE) + : + BWindow(frame, "ALM Hello World", B_TITLED_WINDOW, + B_QUIT_ON_WINDOW_CLOSE) { button1 = new BButton("Hello World!"); @@ -48,7 +49,8 @@ private: class HelloWorld : public BApplication { public: HelloWorld() - : BApplication("application/x-vnd.haiku.HelloWorld") + : + BApplication("application/x-vnd.haiku.HelloWorld") { BRect frameRect; frameRect.Set(100, 100, 300, 300); diff --git a/src/tests/libs/alm/Pinwheel.cpp b/src/tests/libs/alm/Pinwheel.cpp index 59684d332f..aa48364701 100644 --- a/src/tests/libs/alm/Pinwheel.cpp +++ b/src/tests/libs/alm/Pinwheel.cpp @@ -18,8 +18,8 @@ class PinwheelWindow : public BWindow { public: PinwheelWindow(BRect frame) - : BWindow(frame, "ALM Pinwheel", - B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE) + : + BWindow(frame, "ALM Pinwheel", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE) { button1 = new BButton("1"); button2 = new BButton("2"); @@ -47,30 +47,17 @@ public: YTab* y1 = layout->AddYTab(); YTab* y2 = layout->AddYTab(); - Area* a1 = layout->AddArea( - layout->Left(), layout->Top(), - x2, y1, + Area* a1 = layout->AddArea(layout->Left(), layout->Top(), x2, y1, button1); - Area* a2 = layout->AddArea( - x2, layout->Top(), - layout->Right(), y2, - button2); - Area* a3 = layout->AddArea( - x1, y2, - layout->Right(), layout->Bottom(), + layout->AddArea(x2, layout->Top(), layout->Right(), y2, button2); + Area* a3 = layout->AddArea(x1, y2, layout->Right(), layout->Bottom(), button3); - Area* a4 = layout->AddArea( - layout->Left(), y1, - x1, layout->Bottom(), - button4); - Area* a5 = layout->AddArea( - x1, y1, - x2, y2, - textView1); + layout->AddArea(layout->Left(), y1, x1, layout->Bottom(), button4); + layout->AddArea(x1, y1, x2, y2, textView1); a1->HasSameSizeAs(a3); } - + private: BButton* button1; BButton* button2; @@ -83,7 +70,8 @@ private: class Pinwheel : public BApplication { public: Pinwheel() - : BApplication("application/x-vnd.haiku.Pinwheel") + : + BApplication("application/x-vnd.haiku.Pinwheel") { BRect frameRect; frameRect.Set(100, 100, 300, 300); diff --git a/src/tests/libs/alm/TwoViews.cpp b/src/tests/libs/alm/TwoViews.cpp index b3509f9a7a..6be2a97167 100644 --- a/src/tests/libs/alm/TwoViews.cpp +++ b/src/tests/libs/alm/TwoViews.cpp @@ -34,13 +34,9 @@ public: // create an extra tab XTab* x1 = layout->AddXTab(); - Area* a1 = layout->AddArea( - layout->Left(), layout->Top(), - x1, layout->Bottom(), + layout->AddArea(layout->Left(), layout->Top(), x1, layout->Bottom(), button1); - Area* a2 = layout->AddArea( - x1, layout->Top(), - layout->Right(), layout->Bottom(), + layout->AddArea(x1, layout->Top(), layout->Right(), layout->Bottom(), textView1); // add a constraint: 2*x1 == right