Use correct XmlParser-methods and add some missing casts
parent
052594568a
commit
cb657e4c13
|
@ -879,7 +879,7 @@ void X3DImporter::readSphere(XmlNode &node) {
|
|||
X3DNodeElementBase *ne(nullptr);
|
||||
|
||||
MACRO_ATTRREAD_CHECKUSEDEF_RET(node, def, use);
|
||||
XmlParser::getFloatAttribute(node, "radius", radius);
|
||||
XmlParser::getRealAttribute(node, "radius", radius);
|
||||
XmlParser::getBoolAttribute(node, "solid", solid);
|
||||
|
||||
// if "USE" defined then find already defined element.
|
||||
|
|
|
@ -1410,7 +1410,7 @@ void glTF2Exporter::ExportMetadata() {
|
|||
}
|
||||
}
|
||||
|
||||
inline Ref<Accessor> GetSamplerInputRef(Asset &asset, std::string &animId, Ref<Buffer> &buffer, std::vector<float> ×) {
|
||||
inline Ref<Accessor> GetSamplerInputRef(Asset &asset, std::string &animId, Ref<Buffer> &buffer, std::vector<ai_real> ×) {
|
||||
return ExportData(asset, animId, buffer, (unsigned int)times.size(), ×[0], AttribType::SCALAR, AttribType::SCALAR, ComponentType_FLOAT);
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,9 @@ class Ref;
|
|||
}
|
||||
|
||||
namespace glTF2 {
|
||||
|
||||
class Asset;
|
||||
|
||||
struct TexProperty;
|
||||
struct TextureInfo;
|
||||
struct NormalTextureInfo;
|
||||
|
@ -84,6 +86,7 @@ struct MaterialIOR;
|
|||
typedef float(vec2)[2];
|
||||
typedef float(vec3)[3];
|
||||
typedef float(vec4)[4];
|
||||
|
||||
} // namespace glTF2
|
||||
|
||||
namespace Assimp {
|
||||
|
|
|
@ -105,7 +105,7 @@ aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
|
|||
return AI_FAILURE;
|
||||
}
|
||||
|
||||
iNum = std::min((size_t)iNum,prop->mDataLength / sizeof(Type));
|
||||
iNum = (unsigned int)std::min((size_t)iNum,prop->mDataLength / sizeof(Type));
|
||||
::memcpy(pOut,prop->mData,iNum * sizeof(Type));
|
||||
if (pMax) {
|
||||
*pMax = iNum;
|
||||
|
|
|
@ -73,7 +73,7 @@ TEST_F(MaterialSystemTest, testFloatArrayProperty) {
|
|||
pf[0] = pf[1] = pf[2] = pf[3] = 12.0f;
|
||||
|
||||
EXPECT_EQ(AI_SUCCESS, pcMat->Get("testKey2", 0, 0, pf, &pMax));
|
||||
EXPECT_EQ(sizeof(pf) / sizeof(float), pMax);
|
||||
EXPECT_EQ(sizeof(pf) / sizeof(float), static_cast<size_t>(pMax));
|
||||
EXPECT_TRUE(!pf[0] && 1.0f == pf[1] && 2.0f == pf[2] && 3.0f == pf[3]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue