fix the linux build.

This commit is contained in:
Kim Kulling
2020-03-21 08:56:49 +01:00
parent b40769c395
commit 9f7d9becb2
6 changed files with 44 additions and 16 deletions
+14 -3
View File
@@ -80,7 +80,18 @@ struct Material : public D3DS::Material
}
Material(const Material &other) = default;
Material &operator=(const Material &other) = default;
Material &operator=(const Material &other) {
if (this == &other) {
return *this;
}
avSubMaterials = other.avSubMaterials;
pcInstance = other.pcInstance;
bNeed = other.bNeed;
return *this;
}
//! Move constructor. This is explicitly written because MSVC doesn't support defaulting it
@@ -94,12 +105,12 @@ struct Material : public D3DS::Material
}
Material &operator=(Material &&other) AI_NO_EXCEPT {
Material &operator=( Material &&other) AI_NO_EXCEPT {
if (this == &other) {
return *this;
}
D3DS::Material::operator=(std::move(other));
//D3DS::Material::operator=(std::move(other));
avSubMaterials = std::move(other.avSubMaterials);
pcInstance = std::move(other.pcInstance);
+2 -2
View File
@@ -364,7 +364,7 @@ void B3DImporter::ReadVRTS(){
int v0=static_cast<int>(_vertices.size());
_vertices.resize( v0+n_verts );
for( int i=0;i<n_verts;++i ){
for( unsigned int i=0;i<n_verts;++i ){
Vertex &v=_vertices[v0+i];
memset( v.bones,0,sizeof(v.bones) );
@@ -414,7 +414,7 @@ void B3DImporter::ReadTRIS(int v0) {
size_t n_tris = ChunkSize() / 12;
aiFace *face = mesh->mFaces = new aiFace[n_tris];
for (int i = 0; i < n_tris; ++i) {
for (unsigned int i = 0; i < n_tris; ++i) {
int i0 = ReadInt() + v0;
int i1 = ReadInt() + v0;
int i2 = ReadInt() + v0;
+9 -2
View File
@@ -59,7 +59,14 @@ namespace Assimp {
const std::string ObjFileParser::DEFAULT_MATERIAL = AI_DEFAULT_MATERIAL_NAME;
ObjFileParser::ObjFileParser() :
m_DataIt(), m_DataItEnd(), m_pModel(nullptr), m_uiLine(0), m_pIO(nullptr), m_progress(nullptr), m_originalObjFileName() {
m_DataIt(),
m_DataItEnd(),
m_pModel(nullptr),
m_uiLine(0),
m_buffer(),
m_pIO(nullptr),
m_progress(nullptr),
m_originalObjFileName() {
// empty
}
@@ -69,8 +76,8 @@ ObjFileParser::ObjFileParser(IOStreamBuffer<char> &streamBuffer, const std::stri
m_DataIt(),
m_DataItEnd(),
m_pModel(nullptr),
m_buffer(),
m_uiLine(0),
m_buffer(),
m_pIO(io),
m_progress(progress),
m_originalObjFileName(originalObjFileName) {
+5 -2
View File
@@ -727,8 +727,11 @@ struct InternGenericConvert<Maybe<T>> {
}
};
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable : 4127)
#endif // _WIN32
template <typename T, uint64_t min_cnt, uint64_t max_cnt>
struct InternGenericConvertList {
void operator()(ListOf<T, min_cnt, max_cnt> &out, const std::shared_ptr<const EXPRESS::DataType> &inp_base, const STEP::DB &db) {
@@ -759,8 +762,6 @@ struct InternGenericConvertList {
}
};
#pragma warning(pop)
template <typename T>
struct InternGenericConvert<Lazy<T>> {
void operator()(Lazy<T> &out, const std::shared_ptr<const EXPRESS::DataType> &in_base, const STEP::DB &db) {
@@ -959,7 +960,9 @@ private:
const EXPRESS::ConversionSchema *schema;
};
#ifdef _WIN32
#pragma warning(pop)
#endif // _WIN32
} // namespace STEP