From David Callu, warning fixes and removal of spaces at end of lines.

This commit is contained in:
Robert Osfield
2013-06-28 12:00:43 +00:00
parent d82768417d
commit 097aedf23c
100 changed files with 496 additions and 428 deletions

View File

@@ -43,7 +43,7 @@ void BrowserManager::init(const std::string& application)
_application = application;
}
BrowserImage* BrowserManager::createBrowserImage(const std::string& url, int width, int height)
BrowserImage* BrowserManager::createBrowserImage(const std::string& /*url*/, int /*width*/, int /*height*/)
{
OSG_NOTICE<<"Cannot create browser"<<std::endl;
return 0;

View File

@@ -12,7 +12,7 @@ Canvas::Canvas(const Canvas& canvas, const osg::CopyOp& co):
Window(canvas, co) {
}
void Canvas::_resizeImplementation(point_type w, point_type h) {
void Canvas::_resizeImplementation(point_type /*w*/, point_type /*h*/) {
// A Canvas has no layout, so it doesn't really know how to honor a resize
// request. :) The best I could do here is store the differences and add them
// later to the calls to getWidth/getHeight.

View File

@@ -42,7 +42,7 @@ _corner (corner._corner)
{
}
void Frame::Corner::parented(Window* window) {
void Frame::Corner::parented(Window* /*window*/) {
Frame* parent = dynamic_cast<Frame*>(getParent());
if(!parent) return;
@@ -50,7 +50,7 @@ void Frame::Corner::parented(Window* window) {
if(parent->canResize()) setEventMask(EVENT_MASK_MOUSE_DRAG);
}
bool Frame::Corner::mouseDrag(double x, double y, const WindowManager* wm)
bool Frame::Corner::mouseDrag(double x, double y, const WindowManager* /*wm*/)
{
Frame* parent = dynamic_cast<Frame*>(getParent());
@@ -88,7 +88,7 @@ _border (border._border)
{
}
void Frame::Border::parented(Window* window) {
void Frame::Border::parented(Window* /*window*/) {
Frame* parent = dynamic_cast<Frame*>(getParent());
if(!parent) return;
@@ -137,7 +137,7 @@ void Frame::Border::positioned()
}
}
bool Frame::Border::mouseDrag(double x, double y, const WindowManager* wm)
bool Frame::Border::mouseDrag(double x, double y, const WindowManager* /*wm*/)
{
Frame* parent = dynamic_cast<Frame*>(getParent());

View File

@@ -94,6 +94,8 @@ void Input::_calculateSize(const XYCoord& size) {
if(width > getWidth()) setWidth(osg::round(width));
if(height > getHeight()) setHeight(osg::round(height));
#else
OSG_UNUSED(size);
#endif
}
@@ -281,11 +283,11 @@ void Input::positioned()
}
}
bool Input::keyUp(int key, int mask, const WindowManager*) {
bool Input::keyUp(int /*key*/, int /*mask*/, const WindowManager*) {
return false;
}
bool Input::mouseDrag (double x, double y, const WindowManager*)
bool Input::mouseDrag (double x, double /*y*/, const WindowManager*)
{
_mouseClickX += x;
x = _mouseClickX;
@@ -306,7 +308,7 @@ bool Input::mouseDrag (double x, double y, const WindowManager*)
return true;
}
bool Input::mousePush (double x, double y, const WindowManager* wm)
bool Input::mousePush (double x, double /*y*/, const WindowManager* /*wm*/)
{
double offset = getOrigin().x();
Window* window = getParent();

View File

@@ -142,6 +142,7 @@ bool LuaEngine::eval(const std::string& code) {
return true;
#else
OSG_UNUSED(code);
return noLuaFail("Can't evaluate code in LuaEngine");
#endif
}
@@ -163,6 +164,7 @@ bool LuaEngine::runFile(const std::string& filePath) {
return true;
#else
OSG_UNUSED(filePath);
return noLuaFail("Can't run file in LuaEngine");
#endif
}

View File

@@ -156,6 +156,7 @@ bool PythonEngine::eval(const std::string& code) {
return true;
#else
OSG_UNUSED(code);
return noPythonFail("Can't evaluate code in PythonEngine");
#endif
}
@@ -207,6 +208,7 @@ bool PythonEngine::runFile(const std::string& filePath) {
return true;
#else
OSG_UNUSED(filePath);
return noPythonFail("Can't evaluate code in PythonEngine");
#endif
}

View File

@@ -164,11 +164,11 @@ bool Style::applyStyle(Widget* widget, Reader r) {
return true;
}
bool Style::applyStyle(Label* label, Reader r) {
bool Style::applyStyle(Label* /*label*/, Reader /*r*/) {
return false;
}
bool Style::applyStyle(Input* input, Reader r) {
bool Style::applyStyle(Input* /*input*/, Reader /*r*/) {
return false;
}
@@ -217,12 +217,12 @@ bool Style::applyStyle(Window* window, Reader r) {
return true;
}
bool Style::applyStyle(Canvas* label, Reader r) {
bool Style::applyStyle(Canvas* /*label*/, Reader /*r*/) {
return false;
}
bool Style::applyStyle(Window::EmbeddedWindow*, Reader r) {
bool Style::applyStyle(Window::EmbeddedWindow*, Reader /*r*/) {
return false;
}
@@ -232,11 +232,11 @@ bool Style::applyStyle(Box* box, Reader r) {
return false;
}
bool Style::applyStyle(Frame::Corner*, Reader r) {
bool Style::applyStyle(Frame::Corner*, Reader /*r*/) {
return false;
}
bool Style::applyStyle(Frame::Border*, Reader r) {
bool Style::applyStyle(Frame::Border*, Reader /*r*/) {
return false;
}

View File

@@ -10,9 +10,9 @@ _wm(wm) {
bool MouseHandler::handle(
const osgGA::GUIEventAdapter& gea,
osgGA::GUIActionAdapter& gaa,
osg::Object* obj,
osg::NodeVisitor* nv
osgGA::GUIActionAdapter& /*gaa*/,
osg::Object* /*obj*/,
osg::NodeVisitor* /*nv*/
) {
osgGA::GUIEventAdapter::EventType ev = gea.getEventType();
MouseAction ma = _isMouseEvent(ev);
@@ -78,15 +78,15 @@ bool MouseHandler::_handleMouseRelease(float x, float y, int button) {
else return false;
}
bool MouseHandler::_handleMouseDoubleClick(float x, float y, int button) {
bool MouseHandler::_handleMouseDoubleClick(float /*x*/, float /*y*/, int /*button*/) {
return false;
}
bool MouseHandler::_handleMouseDrag(float x, float y, int button) {
bool MouseHandler::_handleMouseDrag(float x, float y, int /*button*/) {
return _doMouseEvent(x, y, &WindowManager::pointerDrag);
}
bool MouseHandler::_handleMouseMove(float x, float y, int button) {
bool MouseHandler::_handleMouseMove(float x, float y, int /*button*/) {
return _doMouseEvent(x, y, &WindowManager::pointerMove);
}
@@ -139,9 +139,9 @@ _wm(wm) {
bool KeyboardHandler::handle(
const osgGA::GUIEventAdapter& gea,
osgGA::GUIActionAdapter& gaa,
osg::Object* obj,
osg::NodeVisitor* nv
osgGA::GUIActionAdapter& /*gaa*/,
osg::Object* /*obj*/,
osg::NodeVisitor* /*nv*/
) {
osgGA::GUIEventAdapter::EventType ev = gea.getEventType();
@@ -170,9 +170,9 @@ _camera (camera) {
bool ResizeHandler::handle(
const osgGA::GUIEventAdapter& gea,
osgGA::GUIActionAdapter& gaa,
osg::Object* obj,
osg::NodeVisitor* nv
osgGA::GUIActionAdapter& /*gaa*/,
osg::Object* /*obj*/,
osg::NodeVisitor* /*nv*/
) {
osgGA::GUIEventAdapter::EventType ev = gea.getEventType();
@@ -201,8 +201,8 @@ _camera (camera) {
bool CameraSwitchHandler::handle(
const osgGA::GUIEventAdapter& gea,
osgGA::GUIActionAdapter& gaa,
osg::Object* obj,
osg::NodeVisitor* nv
osg::Object* /*obj*/,
osg::NodeVisitor* /*nv*/
) {
if(
gea.getEventType() != osgGA::GUIEventAdapter::KEYDOWN ||

View File

@@ -883,7 +883,7 @@ void Window::managed(WindowManager* wm) {
update();
}
void Window::unmanaged(WindowManager* wm) {
void Window::unmanaged(WindowManager* /*wm*/) {
for(Iterator i = begin(); i != end(); i++) _setManaged(i->get(), true);
_wm = 0;
@@ -911,7 +911,7 @@ bool Window::removeWidget(Widget* widget) {
return false;
}
bool Window::replaceWidget(Widget* oldWidget, Widget* newWidget) {
bool Window::replaceWidget(Widget* /*oldWidget*/, Widget* /*newWidget*/) {
return false;
}

View File

@@ -163,7 +163,7 @@ bool WindowManager::_handleMousePushed(float x, float y, bool& down) {
return _lastPush->callMethodAndCallbacks(ev);
}
bool WindowManager::_handleMouseReleased(float x, float y, bool& down) {
bool WindowManager::_handleMouseReleased(float /*x*/, float /*y*/, bool& down) {
down = false;
// If were were in a drag state, reset our boolean flag.
@@ -300,14 +300,14 @@ bool WindowManager::pickAtXY(float x, float y, WidgetList& wl)
{
Intersections intr;
osg::Camera* camera = _view->getCamera();
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(camera->getGraphicsContext());
if (gw)
{
_view->computeIntersections(camera, osgUtil::Intersector::WINDOW, x, y, intr, _nodeMask);
}
if (!intr.empty())
{
// Get the first Window at the XY coordinates; if you want a Window to be