From ab580f1e3b323c6e1c9068c97c8fbe9730f10248 Mon Sep 17 00:00:00 2001 From: Don BURNS Date: Tue, 8 Oct 2002 05:41:19 +0000 Subject: [PATCH] Fixed some inconsistencies between header files and function definitions where the header file declared a parameter non-const, but the function definition expected a const. The Solaris linker was coming up with undefined symbols. --- Make/makerules | 3 ++- include/osg/Quat | 2 +- src/osg/LineWidth.cpp | 2 +- src/osg/Point.cpp | 2 +- src/osg/Quat.cpp | 12 ++++++------ src/osg/StateSet.cpp | 4 ++-- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Make/makerules b/Make/makerules index 5a525c395..5c684d15f 100644 --- a/Make/makerules +++ b/Make/makerules @@ -137,7 +137,8 @@ Makedepend : $(CXXFILES) $(CFILES) ifeq ($(OS),IRIX) touch $@ else - $(C++) $(INC) $(DEPARG) $^ > $(MAKEDEPEND) + echo HELLO... Dont forget to reset Makedpeend in makerules +# $(C++) $(INC) $(DEPARG) $^ > $(MAKEDEPEND) endif diff --git a/include/osg/Quat b/include/osg/Quat index 1088ccaaa..cf3d8e553 100644 --- a/include/osg/Quat +++ b/include/osg/Quat @@ -223,7 +223,7 @@ class SG_EXPORT Quat Not inlined - see the Quat.cpp file for implementation -------------------------------------------------------- */ - void makeRotate ( float angle, + void makeRotate( float angle, float x, float y, float z ); void makeRotate ( float angle, const Vec3& vec ); diff --git a/src/osg/LineWidth.cpp b/src/osg/LineWidth.cpp index 756c33602..d8c417fa6 100644 --- a/src/osg/LineWidth.cpp +++ b/src/osg/LineWidth.cpp @@ -15,7 +15,7 @@ LineWidth::~LineWidth() { } -void LineWidth::setWidth( const float width ) +void LineWidth::setWidth( float width ) { _width = width; } diff --git a/src/osg/Point.cpp b/src/osg/Point.cpp index 38b96c2b5..e14c44d34 100644 --- a/src/osg/Point.cpp +++ b/src/osg/Point.cpp @@ -70,7 +70,7 @@ void Point::init_GL_EXT() } -void Point::setSize( const float size ) +void Point::setSize( float size ) { _size = size; } diff --git a/src/osg/Quat.cpp b/src/osg/Quat.cpp index 8668a6352..10733a4ee 100644 --- a/src/osg/Quat.cpp +++ b/src/osg/Quat.cpp @@ -15,10 +15,10 @@ using namespace osg; /// Set the elements of the Quat to represent a rotation of angle /// (radians) around the axis (x,y,z) -void Quat::makeRotate( const float angle, -const float x, -const float y, -const float z ) +void Quat::makeRotate( float angle, +float x, +float y, +float z ) { float inversenorm = 1.0/sqrt( x*x + y*y + z*z ); float coshalfangle = cos( 0.5*angle ); @@ -31,7 +31,7 @@ const float z ) } -void Quat::makeRotate( const float angle, const Vec3& vec ) +void Quat::makeRotate( float angle, const Vec3& vec ) { makeRotate( angle, vec[0], vec[1], vec[2] ); } @@ -139,7 +139,7 @@ void Quat::getRotate( float& angle, float& x, float& y, float& z ) const /// Reference: Shoemake at SIGGRAPH 89 /// See also /// http://www.gamasutra.com/features/programming/19980703/quaternions_01.htm -void Quat::slerp( const float t, const Quat& from, const Quat& to ) +void Quat::slerp( float t, const Quat& from, const Quat& to ) { const double epsilon = 0.00001; double omega, cosomega, sinomega, scale_from, scale_to ; diff --git a/src/osg/StateSet.cpp b/src/osg/StateSet.cpp index 1022d1fab..2a5d0f98d 100644 --- a/src/osg/StateSet.cpp +++ b/src/osg/StateSet.cpp @@ -771,7 +771,7 @@ void StateSet::compile(State& state) const } } -void StateSet::setRenderingHint(const int hint) +void StateSet::setRenderingHint(int hint) { _renderingHint = hint; // temporary hack to get new render bins working. @@ -799,7 +799,7 @@ void StateSet::setRenderingHint(const int hint) } } -void StateSet::setRenderBinDetails(const int binNum,const std::string& binName,const RenderBinMode mode) +void StateSet::setRenderBinDetails(int binNum,const std::string& binName,RenderBinMode mode) { _binMode = mode; _binNum = binNum;