From 018022fd9b54e26e5a6c6fa2f12dc53d929bab73 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 8 Jun 2016 13:37:17 +0100 Subject: [PATCH] Fixed unused parameter warning. --- examples/osgwidgetscrolled/osgwidgetscrolled.cpp | 3 ++- examples/osgwidgettable/osgwidgettable.cpp | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/osgwidgetscrolled/osgwidgetscrolled.cpp b/examples/osgwidgetscrolled/osgwidgetscrolled.cpp index 21f984b04..f04675de4 100644 --- a/examples/osgwidgetscrolled/osgwidgetscrolled.cpp +++ b/examples/osgwidgetscrolled/osgwidgetscrolled.cpp @@ -77,7 +77,8 @@ bool changeTheme(osgWidget::Event& ev) { return true; } -int main(int argc, char** argv) { +int main(int, char**) +{ osgViewer::Viewer viewer; osgWidget::WindowManager* wm = new osgWidget::WindowManager( diff --git a/examples/osgwidgettable/osgwidgettable.cpp b/examples/osgwidgettable/osgwidgettable.cpp index 3a152abf1..64389df1f 100644 --- a/examples/osgwidgettable/osgwidgettable.cpp +++ b/examples/osgwidgettable/osgwidgettable.cpp @@ -12,7 +12,8 @@ const unsigned int MASK_2D = 0xF0000000; // dynamically added to. Secondly, a table is matrix Layout, with both vertical and // horizontal placement cells. A Box, on the other hand, can only be vertical or horizontal. -int main(int argc, char** argv) { +int main(int, char**) +{ osgViewer::Viewer viewer; osgWidget::WindowManager* wm = new osgWidget::WindowManager( @@ -22,7 +23,7 @@ int main(int argc, char** argv) { MASK_2D, osgWidget::WindowManager::WM_PICK_DEBUG ); - + osgWidget::Table* table = new osgWidget::Table("table", 3, 3); // Here we create our "cells" manually, though it will often be convenient to @@ -32,11 +33,11 @@ int main(int argc, char** argv) { table->addWidget(new osgWidget::Widget("0, 0", 100.0f, 25.0f), 0, 0); table->addWidget(new osgWidget::Widget("0, 1", 100.0f, 25.0f), 0, 1); table->addWidget(new osgWidget::Widget("0, 2", 100.0f, 75.0f), 0, 2); - + table->addWidget(new osgWidget::Widget("1, 0", 200.0f, 45.0f), 1, 0); table->addWidget(new osgWidget::Widget("1, 1", 200.0f, 45.0f), 1, 1); table->addWidget(new osgWidget::Widget("1, 2", 200.0f, 45.0f), 1, 2); - + table->addWidget(new osgWidget::Widget("2, 0", 300.0f, 65.0f), 2, 0); table->addWidget(new osgWidget::Widget("2, 1", 300.0f, 65.0f), 2, 1); table->addWidget(new osgWidget::Widget("2, 2", 300.0f, 65.0f), 2, 2); @@ -58,7 +59,7 @@ int main(int argc, char** argv) { table->getByName("0, 0")->setAlignVertical(osgWidget::Widget::VA_BOTTOM); table->getByName("0, 0")->setPadLeft(50.0f); table->getByName("0, 0")->setPadTop(3.0f); - + // Change the colors a bit to differentiate this row from the others. table->getByName("2, 0")->setColor(1.0f, 0.0f, 0.0f, 1.0f, osgWidget::Widget::LOWER_LEFT); table->getByName("2, 1")->setColor(1.0f, 0.0f, 0.0f, 0.5f);