Skip to content
Snippets Groups Projects
Commit 121ecfe4 authored by Shon Ferguson's avatar Shon Ferguson
Browse files

Changed C++ style unsigned int casts so GCC will be able to understand them.

Properly capitalized include file names in niflib.cpp.
parent f9bf2d7c
No related branches found
No related tags found
No related merge requests found
Showing
with 241 additions and 241 deletions
......@@ -102,7 +102,7 @@ void WriteFloat( float val, ostream& out ){
}
void WriteString( string const & val, ostream& out ) {
WriteUInt( unsigned int(val.size()), out );
WriteUInt( (unsigned int)(val.size()), out );
out.write( val.c_str(), std::streamsize(val.size()) );
}
......@@ -428,7 +428,7 @@ string HexString( const byte * src, unsigned int len ) {
out << hex << setfill('0');
for ( unsigned int i = 0; i < len; ++i ) {
out << uppercase << setw(2) << unsigned int(src[i]);
out << uppercase << setw(2) << (unsigned int)(src[i]);
if (i % 16 == 15 || i == len - 1)
out << endl;
else if (i % 16 == 7)
......@@ -445,7 +445,7 @@ string HexString( const byte * src, unsigned int len ) {
//Byte
ostream & operator<<( ostream & out, byte const & val ) {
return out << unsigned int(val);
return out << (unsigned int)(val);
}
void NifStream( Key<Quaternion> & key, istream& file, unsigned int version, KeyType type ) {
......
......@@ -36,7 +36,7 @@ void Footer::Read( istream& in, list<unsigned int> & link_stack, unsigned int ve
}
void Footer::Write( ostream& out, const map<NiObjectRef,unsigned int> & link_map, unsigned int version, unsigned int user_version ) const {
numRoots = unsigned int(roots.size());
numRoots = (unsigned int)(roots.size());
if ( version >= 0x0303000D ) {
NifStream( numRoots, out, version );
for (unsigned int i2 = 0; i2 < roots.size(); i2++) {
......@@ -51,7 +51,7 @@ void Footer::Write( ostream& out, const map<NiObjectRef,unsigned int> & link_map
string Footer::asString( bool verbose ) const {
stringstream out;
unsigned int array_output_count = 0;
numRoots = unsigned int(roots.size());
numRoots = (unsigned int)(roots.size());
out << " Num Roots: " << numRoots << endl;
array_output_count = 0;
for (unsigned int i1 = 0; i1 < roots.size(); i1++) {
......
......@@ -82,8 +82,8 @@ void Header::Read( istream& in ) {
}
void Header::Write( ostream& out ) const {
numBlockTypes = unsigned short(blockTypes.size());
numBlocks = unsigned int(blockTypeIndex.size());
numBlockTypes = (unsigned short)(blockTypes.size());
numBlocks = (unsigned int)(blockTypeIndex.size());
NifStream( headerString, out, version );
if ( version <= 0x03010000 ) {
for (unsigned int i2 = 0; i2 < 3; i2++) {
......@@ -132,8 +132,8 @@ void Header::Write( ostream& out ) const {
string Header::asString( bool verbose ) const {
stringstream out;
unsigned int array_output_count = 0;
numBlockTypes = unsigned short(blockTypes.size());
numBlocks = unsigned int(blockTypeIndex.size());
numBlockTypes = (unsigned short)(blockTypes.size());
numBlocks = (unsigned int)(blockTypeIndex.size());
out << " Header String: " << headerString << endl;
array_output_count = 0;
for (unsigned int i1 = 0; i1 < 3; i1++) {
......
......@@ -22,7 +22,7 @@ void NifStream( ForceType & val, istream& in, unsigned int version ) {
}
void NifStream( ForceType const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, ForceType const & val ) {
......@@ -30,7 +30,7 @@ ostream & operator<<( ostream & out, ForceType const & val ) {
case FORCE_PLANAR: return out << "FORCE_PLANAR";
case FORCE_SPHERICAL: return out << "FORCE_SPHERICAL";
case FORCE_UNKNOWN: return out << "FORCE_UNKNOWN";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -44,7 +44,7 @@ void NifStream( HavokMaterial & val, istream& in, unsigned int version ) {
}
void NifStream( HavokMaterial const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, HavokMaterial const & val ) {
......@@ -80,7 +80,7 @@ ostream & operator<<( ostream & out, HavokMaterial const & val ) {
case HAV_MAT_CHAIN_STAIRS: return out << "HAV_MAT_CHAIN_STAIRS";
case HAV_MAT_SNOW_STAIRS: return out << "HAV_MAT_SNOW_STAIRS";
case HAV_MAT_ELEVATOR: return out << "HAV_MAT_ELEVATOR";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -94,7 +94,7 @@ void NifStream( CompareMode & val, istream& in, unsigned int version ) {
}
void NifStream( CompareMode const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, CompareMode const & val ) {
......@@ -106,7 +106,7 @@ ostream & operator<<( ostream & out, CompareMode const & val ) {
case TEST_GREATER: return out << "TEST_GREATER";
case TEST_GREATEREQUAL: return out << "TEST_GREATEREQUAL";
case TEST_ALWAYS: return out << "TEST_ALWAYS";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -120,7 +120,7 @@ void NifStream( TexFilterMode & val, istream& in, unsigned int version ) {
}
void NifStream( TexFilterMode const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, TexFilterMode const & val ) {
......@@ -131,7 +131,7 @@ ostream & operator<<( ostream & out, TexFilterMode const & val ) {
case FILTER_NEAREST_MIPNEAREST: return out << "FILTER_NEAREST_MIPNEAREST";
case FILTER_NEAREST_MIPLERP: return out << "FILTER_NEAREST_MIPLERP";
case FILTER_BILERP_MIPNEAREST: return out << "FILTER_BILERP_MIPNEAREST";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -145,14 +145,14 @@ void NifStream( LightMode & val, istream& in, unsigned int version ) {
}
void NifStream( LightMode const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, LightMode const & val ) {
switch ( val ) {
case LIGHT_MODE_EMISSIVE: return out << "LIGHT_MODE_EMISSIVE";
case LIGHT_MODE_EMI_AMB_DIF: return out << "LIGHT_MODE_EMI_AMB_DIF";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -166,7 +166,7 @@ void NifStream( MipMapFormat & val, istream& in, unsigned int version ) {
}
void NifStream( MipMapFormat const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, MipMapFormat const & val ) {
......@@ -174,7 +174,7 @@ ostream & operator<<( ostream & out, MipMapFormat const & val ) {
case MIP_FMT_NO: return out << "MIP_FMT_NO";
case MIP_FMT_YES: return out << "MIP_FMT_YES";
case MIP_FMT_DEFAULT: return out << "MIP_FMT_DEFAULT";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -188,7 +188,7 @@ void NifStream( StencilAction & val, istream& in, unsigned int version ) {
}
void NifStream( StencilAction const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, StencilAction const & val ) {
......@@ -199,7 +199,7 @@ ostream & operator<<( ostream & out, StencilAction const & val ) {
case ACTION_INCREMENT: return out << "ACTION_INCREMENT";
case ACTION_DECREMENT: return out << "ACTION_DECREMENT";
case ACTION_INVERT: return out << "ACTION_INVERT";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -213,7 +213,7 @@ void NifStream( OblivionLayer & val, istream& in, unsigned int version ) {
}
void NifStream( OblivionLayer const & val, ostream& out, unsigned int version ) {
NifStream( byte(val), out, version );
NifStream( (byte)(val), out, version );
}
ostream & operator<<( ostream & out, OblivionLayer const & val ) {
......@@ -276,7 +276,7 @@ ostream & operator<<( ostream & out, OblivionLayer const & val ) {
case OL_PONYTAIL: return out << "OL_PONYTAIL";
case OL_WING: return out << "OL_WING";
case OL_NULL: return out << "OL_NULL";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -290,7 +290,7 @@ void NifStream( FaceDrawMode & val, istream& in, unsigned int version ) {
}
void NifStream( FaceDrawMode const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, FaceDrawMode const & val ) {
......@@ -299,7 +299,7 @@ ostream & operator<<( ostream & out, FaceDrawMode const & val ) {
case DRAW_CCW: return out << "DRAW_CCW";
case DRAW_CW: return out << "DRAW_CW";
case DRAW_BOTH: return out << "DRAW_BOTH";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -313,7 +313,7 @@ void NifStream( AlphaFormat & val, istream& in, unsigned int version ) {
}
void NifStream( AlphaFormat const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, AlphaFormat const & val ) {
......@@ -322,7 +322,7 @@ ostream & operator<<( ostream & out, AlphaFormat const & val ) {
case ALPHA_BINARY: return out << "ALPHA_BINARY";
case ALPHA_SMOOTH: return out << "ALPHA_SMOOTH";
case ALPHA_DEFAULT: return out << "ALPHA_DEFAULT";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -336,7 +336,7 @@ void NifStream( KeyType & val, istream& in, unsigned int version ) {
}
void NifStream( KeyType const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, KeyType const & val ) {
......@@ -346,7 +346,7 @@ ostream & operator<<( ostream & out, KeyType const & val ) {
case TBC_KEY: return out << "TBC_KEY";
case XYZ_ROTATION_KEY: return out << "XYZ_ROTATION_KEY";
case UNKNOWN_KEY: return out << "UNKNOWN_KEY";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -360,7 +360,7 @@ void NifStream( VertMode & val, istream& in, unsigned int version ) {
}
void NifStream( VertMode const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, VertMode const & val ) {
......@@ -368,7 +368,7 @@ ostream & operator<<( ostream & out, VertMode const & val ) {
case VERT_MODE_SRC_IGNORE: return out << "VERT_MODE_SRC_IGNORE";
case VERT_MODE_SRC_EMISSIVE: return out << "VERT_MODE_SRC_EMISSIVE";
case VERT_MODE_SRC_AMB_DIF: return out << "VERT_MODE_SRC_AMB_DIF";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -382,7 +382,7 @@ void NifStream( ApplyMode & val, istream& in, unsigned int version ) {
}
void NifStream( ApplyMode const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, ApplyMode const & val ) {
......@@ -392,7 +392,7 @@ ostream & operator<<( ostream & out, ApplyMode const & val ) {
case APPLY_MODULATE: return out << "APPLY_MODULATE";
case APPLY_HILIGHT: return out << "APPLY_HILIGHT";
case APPLY_HILIGHT2: return out << "APPLY_HILIGHT2";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -406,14 +406,14 @@ void NifStream( MotionSystem & val, istream& in, unsigned int version ) {
}
void NifStream( MotionSystem const & val, ostream& out, unsigned int version ) {
NifStream( byte(val), out, version );
NifStream( (byte)(val), out, version );
}
ostream & operator<<( ostream & out, MotionSystem const & val ) {
switch ( val ) {
case MO_SYS_BOX: return out << "MO_SYS_BOX";
case MO_SYS_KEYFRAMED: return out << "MO_SYS_KEYFRAMED";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -427,7 +427,7 @@ void NifStream( BillboardMode & val, istream& in, unsigned int version ) {
}
void NifStream( BillboardMode const & val, ostream& out, unsigned int version ) {
NifStream( unsigned short(val), out, version );
NifStream( (unsigned short)(val), out, version );
}
ostream & operator<<( ostream & out, BillboardMode const & val ) {
......@@ -437,7 +437,7 @@ ostream & operator<<( ostream & out, BillboardMode const & val ) {
case RIGID_FACE_CAMERA: return out << "RIGID_FACE_CAMERA";
case ALWAYS_FACE_CENTER: return out << "ALWAYS_FACE_CENTER";
case RIGID_FACE_CENTER: return out << "RIGID_FACE_CENTER";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -451,7 +451,7 @@ void NifStream( TexType & val, istream& in, unsigned int version ) {
}
void NifStream( TexType const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, TexType const & val ) {
......@@ -464,7 +464,7 @@ ostream & operator<<( ostream & out, TexType const & val ) {
case BUMP_MAP: return out << "BUMP_MAP";
case DECAL_0_MAP: return out << "DECAL_0_MAP";
case DECAL_1_MAP: return out << "DECAL_1_MAP";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -478,7 +478,7 @@ void NifStream( PixelLayout & val, istream& in, unsigned int version ) {
}
void NifStream( PixelLayout const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, PixelLayout const & val ) {
......@@ -489,7 +489,7 @@ ostream & operator<<( ostream & out, PixelLayout const & val ) {
case PIX_LAY_COMPRESSED: return out << "PIX_LAY_COMPRESSED";
case PIX_LAY_BUMPMAP: return out << "PIX_LAY_BUMPMAP";
case PIX_LAY_DEFAULT: return out << "PIX_LAY_DEFAULT";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -503,7 +503,7 @@ void NifStream( TexClampMode & val, istream& in, unsigned int version ) {
}
void NifStream( TexClampMode const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, TexClampMode const & val ) {
......@@ -512,7 +512,7 @@ ostream & operator<<( ostream & out, TexClampMode const & val ) {
case CLAMP_S_WRAP_T: return out << "CLAMP_S_WRAP_T";
case WRAP_S_CLAMP_T: return out << "WRAP_S_CLAMP_T";
case WRAP_S_WRAP_T: return out << "WRAP_S_WRAP_T";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -526,7 +526,7 @@ void NifStream( MotionQuality & val, istream& in, unsigned int version ) {
}
void NifStream( MotionQuality const & val, ostream& out, unsigned int version ) {
NifStream( byte(val), out, version );
NifStream( (byte)(val), out, version );
}
ostream & operator<<( ostream & out, MotionQuality const & val ) {
......@@ -540,7 +540,7 @@ ostream & operator<<( ostream & out, MotionQuality const & val ) {
case MO_QUAL_BULLET: return out << "MO_QUAL_BULLET";
case MO_QUAL_USER: return out << "MO_QUAL_USER";
case MO_QUAL_NULL: return out << "MO_QUAL_NULL";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -554,7 +554,7 @@ void NifStream( PixelFormat & val, istream& in, unsigned int version ) {
}
void NifStream( PixelFormat const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, PixelFormat const & val ) {
......@@ -562,7 +562,7 @@ ostream & operator<<( ostream & out, PixelFormat const & val ) {
case PX_FMT_RGB8: return out << "PX_FMT_RGB8";
case PX_FMT_RGBA8: return out << "PX_FMT_RGBA8";
case PX_FMT_PAL8: return out << "PX_FMT_PAL8";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -576,7 +576,7 @@ void NifStream( CycleType & val, istream& in, unsigned int version ) {
}
void NifStream( CycleType const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, CycleType const & val ) {
......@@ -584,7 +584,7 @@ ostream & operator<<( ostream & out, CycleType const & val ) {
case CYCLE_LOOP: return out << "CYCLE_LOOP";
case CYCLE_REVERSE: return out << "CYCLE_REVERSE";
case CYCLE_CLAMP: return out << "CYCLE_CLAMP";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......@@ -598,14 +598,14 @@ void NifStream( FieldType & val, istream& in, unsigned int version ) {
}
void NifStream( FieldType const & val, ostream& out, unsigned int version ) {
NifStream( unsigned int(val), out, version );
NifStream( (unsigned int)(val), out, version );
}
ostream & operator<<( ostream & out, FieldType const & val ) {
switch ( val ) {
case FIELD_WIND: return out << "FIELD_WIND";
case FIELD_POINT: return out << "FIELD_POINT";
default: return out << "Invalid Value! - " << unsigned int(val);
default: return out << "Invalid Value! - " << (unsigned int)(val);
}
}
......
This diff is collapsed.
......@@ -31,8 +31,8 @@ All rights reserved. Please see niflib.h for licence. */
#include "../include/obj/NiExtraData.h"
#include "../include/obj/bhkRigidBody.h"
#include "../include/obj/bhkCollisionObject.h"
#include "../include/gen/header.h"
#include "../include/gen/footer.h"
#include "../include/gen/Header.h"
#include "../include/gen/Footer.h"
namespace Niflib {
......@@ -505,7 +505,7 @@ void EnumerateObjects( NiObject * root, map<Type*,unsigned int> & type_map, map<
//Add this object type to the map if it isn't there already
if ( type_map.find( (Type*)&(root->GetType()) ) == type_map.end() ) {
//The type has not yet been registered, so register it
type_map[ (Type*)&(root->GetType()) ] = unsigned int(type_map.size());
type_map[ (Type*)&(root->GetType()) ] = (unsigned int)(type_map.size());
}
// Oblivion has very rigid requirements about block ordering and the bhkRigidBody
......@@ -522,7 +522,7 @@ void EnumerateObjects( NiObject * root, map<Type*,unsigned int> & type_map, map<
// If reverse is set then add the link after children otherwise add it before
if (!reverse) {
link_map[root] = unsigned int(link_map.size());
link_map[root] = (unsigned int)(link_map.size());
}
//Call this function on all links of this object
......@@ -534,7 +534,7 @@ void EnumerateObjects( NiObject * root, map<Type*,unsigned int> & type_map, map<
}
if (reverse) {
link_map[root] = unsigned int(link_map.size());
link_map[root] = (unsigned int)(link_map.size());
}
}
......@@ -766,10 +766,10 @@ static void SplitNifTree( NiObject * root_block, NiObject * xnif_root, list<NiOb
//TODO: This was written by Amorilia. Figure out how to fix it.
void WriteFileGroup( string const & file_name, NiObject * root_block, const NifInfo & info, ExportOptions export_files, NifGame kf_type ) {
// Get base filename.
unsigned int file_name_slash = unsigned int(file_name.rfind("\\") + 1);
unsigned int file_name_slash = (unsigned int)(file_name.rfind("\\") + 1);
string file_name_path = file_name.substr(0, file_name_slash);
string file_name_base = file_name.substr(file_name_slash, file_name.length());
unsigned int file_name_dot = unsigned int(file_name_base.rfind("."));
unsigned int file_name_dot = (unsigned int)(file_name_base.rfind("."));
file_name_base = file_name_base.substr(0, file_name_dot);
// Deal with the simple case first
......
......@@ -41,7 +41,7 @@ vector<FurniturePosition> BSFurnitureMarker::GetFurniturePositions() const {
}
void BSFurnitureMarker::SetFurniturePositions( const vector<FurniturePosition> & n ) {
numPositions = unsigned int(n.size());
numPositions = (unsigned int)(n.size());
positions = n;
}
......@@ -42,6 +42,6 @@ vector<byte> NiBinaryExtraData::GetData() const {
};
void NiBinaryExtraData::SetData( const vector<byte> & n ) {
binaryData.dataSize = unsigned int(n.size());
binaryData.dataSize = (unsigned int)(n.size());
binaryData.data = n;
};
......@@ -40,6 +40,6 @@ vector<float> NiFloatsExtraData::GetData() const {
}
void NiFloatsExtraData::SetData( const vector<float> & n ) {
numFloats = unsigned int(n.size());
numFloats = (unsigned int)(n.size());
data = n;
}
......@@ -42,7 +42,7 @@ vector< Ref<NiInterpolator> > NiGeomMorpherController::GetInterpolators() const
}
void NiGeomMorpherController::SetInterpolators( const vector< Ref<NiInterpolator> > & n ) {
numInterpolators = unsigned int(n.size());
numInterpolators = (unsigned int)(n.size());
interpolators = n;
}
......
......@@ -40,6 +40,6 @@ vector<unsigned int> NiIntegersExtraData::GetData() const {
};
void NiIntegersExtraData::SetData( const vector<unsigned int> & n ) {
numIntegers = unsigned int( n.size() );
numIntegers = (unsigned int)( n.size() );
data = n;
};
......@@ -53,7 +53,7 @@ void NiKeyframeData::UpdateRotationKeyCount() {
if ( rotationType == XYZ_ROTATION_KEY ) {
numRotationKeys = 1;
} else {
numRotationKeys = unsigned int(quaternionKeys.size());
numRotationKeys = (unsigned int)(quaternionKeys.size());
}
};
......
......@@ -53,7 +53,7 @@ int NiMorphData::GetMorphCount() const {
}
void NiMorphData::SetMorphCount( int n ) {
unsigned int old_size = unsigned int(morphs.size());
unsigned int old_size = (unsigned int)(morphs.size());
morphs.resize( n );
//Make sure any new vertex groups are the right size
......
......@@ -42,7 +42,7 @@ const Type & NiSkinData::GetType() const {
};
unsigned int NiSkinData::GetBoneCount() const {
return unsigned int( boneList.size() );
return (unsigned int)( boneList.size() );
}
Matrix44 NiSkinData::GetBoneTransform( unsigned int bone_index ) const {
......
......@@ -129,7 +129,7 @@ void NiSkinInstance::SkeletonLost() {
}
unsigned int NiSkinInstance::GetBoneCount() const {
return unsigned int(bones.size());
return (unsigned int)(bones.size());
}
Ref<NiNode> NiSkinInstance::GetSkeletonRoot() const {
......
......@@ -41,5 +41,5 @@ string NiStringExtraData::GetData() const {
void NiStringExtraData::SetData( const string & n ) {
stringData = n;
bytesRemaining = unsigned int(stringData.size()) + 4;
bytesRemaining = (unsigned int)(stringData.size()) + 4;
}
......@@ -40,6 +40,6 @@ vector<string> NiStringsExtraData::GetData() const {
};
void NiStringsExtraData::SetData( const vector<string> & n ) {
numStrings = unsigned int(n.size());
numStrings = (unsigned int)(n.size());
data = n;
};
......@@ -87,7 +87,7 @@ void NiTriShapeData::SetTriangles( const vector<Triangle> & in ) {
hasTriangles = ( triangles.size() != 0 );
//Set nuber of triangles
numTriangles = unsigned int(triangles.size());
numTriangles = (unsigned int)(triangles.size());
//Set number of trianble points to the number of triangles times 3
numTrianglePoints = numTriangles * 3;
......
......@@ -40,7 +40,7 @@ vector<float> NiVertWeightsExtraData::GetData() const {
}
void NiVertWeightsExtraData::SetData( const vector<float> & n ) {
numVertices = unsigned int(n.size());
numVertices = (unsigned int)(n.size());
numBytes = numVertices + 2;
weight = n;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment