fix the linux build.

pull/3012/head
Kim Kulling 2020-03-21 08:56:49 +01:00
parent b40769c395
commit 9f7d9becb2
6 changed files with 44 additions and 16 deletions

View File

@ -80,7 +80,18 @@ struct Material : public D3DS::Material
} }
Material(const Material &other) = default; 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 //! 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) { if (this == &other) {
return *this; return *this;
} }
D3DS::Material::operator=(std::move(other)); //D3DS::Material::operator=(std::move(other));
avSubMaterials = std::move(other.avSubMaterials); avSubMaterials = std::move(other.avSubMaterials);
pcInstance = std::move(other.pcInstance); pcInstance = std::move(other.pcInstance);

View File

@ -364,7 +364,7 @@ void B3DImporter::ReadVRTS(){
int v0=static_cast<int>(_vertices.size()); int v0=static_cast<int>(_vertices.size());
_vertices.resize( v0+n_verts ); _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]; Vertex &v=_vertices[v0+i];
memset( v.bones,0,sizeof(v.bones) ); memset( v.bones,0,sizeof(v.bones) );
@ -414,7 +414,7 @@ void B3DImporter::ReadTRIS(int v0) {
size_t n_tris = ChunkSize() / 12; size_t n_tris = ChunkSize() / 12;
aiFace *face = mesh->mFaces = new aiFace[n_tris]; 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 i0 = ReadInt() + v0;
int i1 = ReadInt() + v0; int i1 = ReadInt() + v0;
int i2 = ReadInt() + v0; int i2 = ReadInt() + v0;

View File

@ -59,7 +59,14 @@ namespace Assimp {
const std::string ObjFileParser::DEFAULT_MATERIAL = AI_DEFAULT_MATERIAL_NAME; const std::string ObjFileParser::DEFAULT_MATERIAL = AI_DEFAULT_MATERIAL_NAME;
ObjFileParser::ObjFileParser() : 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 // empty
} }
@ -69,8 +76,8 @@ ObjFileParser::ObjFileParser(IOStreamBuffer<char> &streamBuffer, const std::stri
m_DataIt(), m_DataIt(),
m_DataItEnd(), m_DataItEnd(),
m_pModel(nullptr), m_pModel(nullptr),
m_buffer(),
m_uiLine(0), m_uiLine(0),
m_buffer(),
m_pIO(io), m_pIO(io),
m_progress(progress), m_progress(progress),
m_originalObjFileName(originalObjFileName) { m_originalObjFileName(originalObjFileName) {

View File

@ -727,8 +727,11 @@ struct InternGenericConvert<Maybe<T>> {
} }
}; };
#ifdef _WIN32
#pragma warning(push) #pragma warning(push)
#pragma warning(disable : 4127) #pragma warning(disable : 4127)
#endif // _WIN32
template <typename T, uint64_t min_cnt, uint64_t max_cnt> template <typename T, uint64_t min_cnt, uint64_t max_cnt>
struct InternGenericConvertList { struct InternGenericConvertList {
void operator()(ListOf<T, min_cnt, max_cnt> &out, const std::shared_ptr<const EXPRESS::DataType> &inp_base, const STEP::DB &db) { 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> template <typename T>
struct InternGenericConvert<Lazy<T>> { struct InternGenericConvert<Lazy<T>> {
void operator()(Lazy<T> &out, const std::shared_ptr<const EXPRESS::DataType> &in_base, const STEP::DB &db) { 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; const EXPRESS::ConversionSchema *schema;
}; };
#ifdef _WIN32
#pragma warning(pop) #pragma warning(pop)
#endif // _WIN32
} // namespace STEP } // namespace STEP

View File

@ -701,7 +701,10 @@ ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf, size_t bufsize) {
int zip_entry_fread(struct zip_t *zip, const char *filename) { int zip_entry_fread(struct zip_t *zip, const char *filename) {
mz_zip_archive *pzip = NULL; mz_zip_archive *pzip = NULL;
mz_uint idx; mz_uint idx;
//mz_uint32 xattr = 0; #if defined(_MSC_VER)
#else
mz_uint32 xattr = 0;
#endif
mz_zip_archive_file_stat info; mz_zip_archive_file_stat info;
if (!zip) { if (!zip) {
@ -844,7 +847,11 @@ int zip_extract(const char *zipname, const char *dir,
mz_zip_archive zip_archive; mz_zip_archive zip_archive;
mz_zip_archive_file_stat info; mz_zip_archive_file_stat info;
size_t dirlen = 0; size_t dirlen = 0;
//mz_uint32 xattr = 0; #if defined(_MSC_VER)
#else
mz_uint32 xattr = 0;
#endif
memset(path, 0, sizeof(path)); memset(path, 0, sizeof(path));
memset(symlink_to, 0, sizeof(symlink_to)); memset(symlink_to, 0, sizeof(symlink_to));

View File

@ -61,12 +61,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/defs.h> #include <assimp/defs.h>
// Some types moved to separate header due to size of operators // Some types moved to separate header due to size of operators
#include <assimp/vector2.h>
#include <assimp/vector3.h>
#include <assimp/color4.h> #include <assimp/color4.h>
#include <assimp/matrix3x3.h> #include <assimp/matrix3x3.h>
#include <assimp/matrix4x4.h> #include <assimp/matrix4x4.h>
#include <assimp/quaternion.h> #include <assimp/quaternion.h>
#include <assimp/vector2.h>
#include <assimp/vector3.h>
typedef int32_t ai_int32; typedef int32_t ai_int32;
typedef uint32_t ai_uint32; typedef uint32_t ai_uint32;
@ -525,11 +525,11 @@ struct aiMemoryInfo {
#endif //! __cplusplus #endif //! __cplusplus
// Include implementation files // Include implementation files
#include "vector2.inl"
#include "vector3.inl"
#include "color4.inl" #include "color4.inl"
#include "matrix3x3.inl" #include "matrix3x3.inl"
#include "matrix4x4.inl" #include "matrix4x4.inl"
#include "quaternion.inl" #include "quaternion.inl"
#include "vector2.inl"
#include "vector3.inl"
#endif // AI_TYPES_H_INC #endif // AI_TYPES_H_INC