From 5435f6cf505330a87d43ee979d83f1d08184755c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 28 Apr 2010 20:33:40 +0000 Subject: [PATCH] From Wang Rui, "Two small bugs were just found when I was writing examples for my book in process: a wrong definition of the OSG_FATAL macro, and wrong logic inside the KeySwitchMatrixManipulator::getDistance() function. I believe both were slips." --- include/osg/Notify | 2 +- src/osgGA/KeySwitchMatrixManipulator.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/osg/Notify b/include/osg/Notify index 5b38d7ad6..b1da1775d 100644 --- a/include/osg/Notify +++ b/include/osg/Notify @@ -80,7 +80,7 @@ extern OSG_EXPORT std::ostream& notify(const NotifySeverity severity); inline std::ostream& notify(void) { return notify(osg::INFO); } #define OSG_NOTIFY(level) if (osg::isNotifyEnabled(level)) osg::notify(level) -#define OSG_FATAL OSG_NOTIFY(osg::FALTAL) +#define OSG_FATAL OSG_NOTIFY(osg::FATAL) #define OSG_WARN OSG_NOTIFY(osg::WARN) #define OSG_NOTICE OSG_NOTIFY(osg::NOTICE) #define OSG_INFO OSG_NOTIFY(osg::INFO) diff --git a/src/osgGA/KeySwitchMatrixManipulator.cpp b/src/osgGA/KeySwitchMatrixManipulator.cpp index 11abfe3f3..08a19d49e 100644 --- a/src/osgGA/KeySwitchMatrixManipulator.cpp +++ b/src/osgGA/KeySwitchMatrixManipulator.cpp @@ -69,7 +69,7 @@ void KeySwitchMatrixManipulator::setDistance(double distance) double KeySwitchMatrixManipulator::getDistance() const { - if(!_current) + if(_current) { return _current->getDistance(); }