Fixed build warnings on MSVC14 x64 in the FBX format sources.
parent
acad22cc1e
commit
2ac9b0ce45
|
@ -1076,7 +1076,7 @@ void Converter::SetupNodeMetadata( const Model& model, aiNode& nd )
|
||||||
// create metadata on node
|
// create metadata on node
|
||||||
std::size_t numStaticMetaData = 2;
|
std::size_t numStaticMetaData = 2;
|
||||||
aiMetadata* data = new aiMetadata();
|
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->mKeys = new aiString[ data->mNumProperties ]();
|
||||||
data->mValues = new aiMetadataEntry[ data->mNumProperties ]();
|
data->mValues = new aiMetadataEntry[ data->mNumProperties ]();
|
||||||
nd.mMetaData = data;
|
nd.mMetaData = data;
|
||||||
|
@ -2964,10 +2964,10 @@ Converter::KeyFrameListList Converter::GetKeyframeList( const std::vector<const
|
||||||
//get values within the start/stop time window
|
//get values within the start/stop time window
|
||||||
std::shared_ptr<KeyTimeList> Keys( new KeyTimeList() );
|
std::shared_ptr<KeyTimeList> Keys( new KeyTimeList() );
|
||||||
std::shared_ptr<KeyValueList> Values( new KeyValueList() );
|
std::shared_ptr<KeyValueList> Values( new KeyValueList() );
|
||||||
const int count = curve->GetKeys().size();
|
const size_t count = curve->GetKeys().size();
|
||||||
Keys->reserve( count );
|
Keys->reserve( count );
|
||||||
Values->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 );
|
int64_t k = curve->GetKeys().at( n );
|
||||||
if ( k >= adj_start && k <= adj_stop )
|
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 timeA = std::get<0>(kfl)->at( id0 );
|
||||||
const KeyTimeList::value_type timeB = std::get<0>(kfl)->at( id1 );
|
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 );
|
const ai_real interpValue = static_cast<ai_real>( valueA + ( valueB - valueA ) * factor );
|
||||||
|
|
||||||
result[ std::get<2>(kfl) ] = interpValue;
|
result[ std::get<2>(kfl) ] = interpValue;
|
||||||
|
|
|
@ -600,7 +600,7 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
const int textureCount() const {
|
const int textureCount() const {
|
||||||
return textures.size();
|
return static_cast<int>(textures.size());
|
||||||
}
|
}
|
||||||
const BlendMode GetBlendMode() const
|
const BlendMode GetBlendMode() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -165,7 +165,7 @@ void FBXImporter::InternReadFile( const std::string& pFile,
|
||||||
bool is_binary = false;
|
bool is_binary = false;
|
||||||
if (!strncmp(begin,"Kaydara FBX Binary",18)) {
|
if (!strncmp(begin,"Kaydara FBX Binary",18)) {
|
||||||
is_binary = true;
|
is_binary = true;
|
||||||
TokenizeBinary(tokens,begin,contents.size());
|
TokenizeBinary(tokens,begin,static_cast<unsigned int>(contents.size()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Tokenize(tokens,begin);
|
Tokenize(tokens,begin);
|
||||||
|
|
|
@ -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.next_in = reinterpret_cast<Bytef*>( const_cast<char*>(data) );
|
||||||
zstream.avail_in = comp_len;
|
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());
|
zstream.next_out = reinterpret_cast<Bytef*>(&*buff.begin());
|
||||||
const int ret = inflate(&zstream, Z_FINISH);
|
const int ret = inflate(&zstream, Z_FINISH);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue