Fixed build warnings on MSVC14 x64 in the FBX format sources.

pull/1083/head
Jared Mulconry 2016-11-19 23:50:03 +11:00
parent acad22cc1e
commit 2ac9b0ce45
4 changed files with 7 additions and 7 deletions

View File

@ -1076,7 +1076,7 @@ void Converter::SetupNodeMetadata( const Model& model, aiNode& nd )
// create metadata on node
std::size_t numStaticMetaData = 2;
aiMetadata* data = new aiMetadata();
data->mNumProperties = unparsedProperties.size() + numStaticMetaData;
data->mNumProperties = static_cast<unsigned int>(unparsedProperties.size() + numStaticMetaData);
data->mKeys = new aiString[ data->mNumProperties ]();
data->mValues = new aiMetadataEntry[ data->mNumProperties ]();
nd.mMetaData = data;
@ -2964,10 +2964,10 @@ Converter::KeyFrameListList Converter::GetKeyframeList( const std::vector<const
//get values within the start/stop time window
std::shared_ptr<KeyTimeList> Keys( new KeyTimeList() );
std::shared_ptr<KeyValueList> Values( new KeyValueList() );
const int count = curve->GetKeys().size();
const size_t count = curve->GetKeys().size();
Keys->reserve( count );
Values->reserve( count );
for ( int n = 0; n < count; n++ )
for (size_t n = 0; n < count; n++ )
{
int64_t k = curve->GetKeys().at( n );
if ( k >= adj_start && k <= adj_stop )
@ -3068,7 +3068,7 @@ void Converter::InterpolateKeys( aiVectorKey* valOut, const KeyTimeList& keys, c
const KeyTimeList::value_type timeA = std::get<0>(kfl)->at( id0 );
const KeyTimeList::value_type timeB = std::get<0>(kfl)->at( id1 );
const ai_real factor = timeB == timeA ? 0. : static_cast<ai_real>( ( time - timeA ) ) / ( timeB - timeA );
const ai_real factor = timeB == timeA ? ai_real(0.) : static_cast<ai_real>( ( time - timeA ) ) / ( timeB - timeA );
const ai_real interpValue = static_cast<ai_real>( valueA + ( valueB - valueA ) * factor );
result[ std::get<2>(kfl) ] = interpValue;

View File

@ -600,7 +600,7 @@ public:
}
const int textureCount() const {
return textures.size();
return static_cast<int>(textures.size());
}
const BlendMode GetBlendMode() const
{

View File

@ -165,7 +165,7 @@ void FBXImporter::InternReadFile( const std::string& pFile,
bool is_binary = false;
if (!strncmp(begin,"Kaydara FBX Binary",18)) {
is_binary = true;
TokenizeBinary(tokens,begin,contents.size());
TokenizeBinary(tokens,begin,static_cast<unsigned int>(contents.size()));
}
else {
Tokenize(tokens,begin);

View File

@ -583,7 +583,7 @@ void ReadBinaryDataArray(char type, uint32_t count, const char*& data, const cha
zstream.next_in = reinterpret_cast<Bytef*>( const_cast<char*>(data) );
zstream.avail_in = comp_len;
zstream.avail_out = buff.size();
zstream.avail_out = static_cast<uInt>(buff.size());
zstream.next_out = reinterpret_cast<Bytef*>(&*buff.begin());
const int ret = inflate(&zstream, Z_FINISH);