Hello Gerrit,
On 04/14/2011 03:02 AM, Gerrit Voss wrote:
- Log -----------------------------------------------------------------
commitdiff:
http://opensg.git.sourceforge.net/git/gitweb.cgi?p=opensg/opensg;a=commitdiff;h=6eb7a447866343c04e924cbea983cf2995c82590
commit 6eb7a447866343c04e924cbea983cf2995c82590
Author: gerrit<[email protected]>
Date: Thu Apr 14 16:00:24 2011 +0800
fixed: minor compile problems
sorry about the breakage. Most of the changes i understand, but this one
in the ogre loader:
OgreSkeletonReader::readAnimationLink(void)
{
std::string skelName = readString(_is);
- Real32 scale = readReal32(_is);
+#ifndef OSG_OGRE_SILENT
+ Real32 scale =
+#endif
+ readReal32(_is);
is this to avoid an unused variable warning? Why does it not affect
skelName which is also only used in the log message?
Can we use osgSinkUnusedWarning (from OSGConecptPropertyChecks.h)
instead [1], I find that more readable than using CPP to kill half lines ;)
Cheers,
Carsten
[1] see attached
diff --git a/Source/System/FileIO/Ogre/OSGOgreSkeletonReader.cpp
b/Source/System/FileIO/Ogre/OSGOgreSkeletonReader.cpp
index ed1981f..2ab6a2f 100644
--- a/Source/System/FileIO/Ogre/OSGOgreSkeletonReader.cpp
+++ b/Source/System/FileIO/Ogre/OSGOgreSkeletonReader.cpp
@@ -41,6 +41,7 @@
#include "OSGAnimKeyFrameTemplate.h"
#include "OSGAnimTargetAttachment.h"
+#include "OSGConceptPropertyChecks.h"
#include "OSGNameAttachment.h"
#include "OSGQuaternion.h"
#include "OSGSkeleton.h"
@@ -249,10 +250,9 @@ OgreSkeletonReader::readAnimation(JointNodeStore &joints)
if(_options.getLoadAnimations() == true)
{
std::string animName = readString(_is);
-#ifndef OSG_OGRE_SILENT
- Real32 animLen =
-#endif
- readReal32(_is);
+ Real32 animLen = readReal32(_is);
+
+ osgSinkUnusedWarning(animLen);
OSG_OGRE_LOG(("OgreSkeletonReader::readAnimation: "
"animName '%s' animLen '%f'\n", animName.c_str(),
animLen));
@@ -416,10 +416,10 @@ void
OgreSkeletonReader::readAnimationLink(void)
{
std::string skelName = readString(_is);
-#ifndef OSG_OGRE_SILENT
- Real32 scale =
-#endif
- readReal32(_is);
+ Real32 scale = readReal32(_is);
+
+ osgSinkUnusedWarning(skelName);
+ osgSinkUnusedWarning(scale);
OSG_OGRE_LOG(("OgreSkeletonReader::readAnimationLink "
"skelName '%s' scale '%f'\n", skelName.c_str(), scale));
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core