Minor tweaks of ints to unsigned ints

This commit is contained in:
Robert Osfield 2006-05-16 21:20:36 +00:00
parent 690aeea7e4
commit e1c77dfe2a
3 changed files with 4 additions and 4 deletions

View File

@ -281,7 +281,7 @@ class OSG_EXPORT StateSet : public Object
Uniform* getUniform(const std::string& name);
/** Get Uniform for specified name, if one is not available create it, add it to this StateSet and return a pointer to it.*/
Uniform* getOrCreateUniform(const std::string& name, Uniform::Type type, int numElements=1);
Uniform* getOrCreateUniform(const std::string& name, Uniform::Type type, unsigned int numElements=1);
/** Get const Uniform for specified name.
* Returns NULL if no matching Uniform is contained within StateSet.*/

View File

@ -924,7 +924,7 @@ Uniform* StateSet::getUniform(const std::string& name)
else return 0;
}
Uniform* StateSet::getOrCreateUniform(const std::string& name, Uniform::Type type, int numElements)
Uniform* StateSet::getOrCreateUniform(const std::string& name, Uniform::Type type, unsigned int numElements)
{
// for look for an appropriate uniform.
UniformList::iterator itr = _uniformList.find(name);

View File

@ -40,7 +40,7 @@ void Uniform::write(DataOutputStream* out){
if ( out->getVersion() >= VERSION_0016 )
{
out->writeInt(getNumElements());
out->writeUInt(getNumElements());
if( getFloatArray() ) out->writeArray( getFloatArray() );
if( getIntArray() ) out->writeArray( getIntArray() );
@ -173,7 +173,7 @@ void Uniform::read(DataInputStream* in)
if ( in->getVersion() >= VERSION_0016 )
{
setNumElements( in->readInt() );
setNumElements( in->readUInt() );
osg::Array* data = in->readArray();
setArray( dynamic_cast<osg::FloatArray*>(data) );