mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 05:35:52 +08:00
Fix compilation
This commit is contained in:
parent
d88f05945d
commit
048fafb9f9
@ -57,7 +57,9 @@ typedef struct {
|
||||
float z;
|
||||
} stl_vertex;
|
||||
|
||||
#ifdef static_assert
|
||||
static_assert(sizeof(stl_vertex) == 12, "size of stl_vertex incorrect");
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
float x;
|
||||
@ -65,7 +67,9 @@ typedef struct {
|
||||
float z;
|
||||
} stl_normal;
|
||||
|
||||
#ifdef static_assert
|
||||
static_assert(sizeof(stl_normal) == 12, "size of stl_normal incorrect");
|
||||
#endif
|
||||
|
||||
typedef char stl_extra[2];
|
||||
|
||||
@ -76,10 +80,12 @@ typedef struct {
|
||||
} stl_facet;
|
||||
#define SIZEOF_STL_FACET 50
|
||||
|
||||
#ifdef static_assert
|
||||
static_assert(offsetof(stl_facet, normal) == 0, "stl_facet.normal has correct offset");
|
||||
static_assert(offsetof(stl_facet, vertex) == 12, "stl_facet.vertex has correct offset");
|
||||
static_assert(offsetof(stl_facet, extra ) == 48, "stl_facet.extra has correct offset");
|
||||
static_assert(sizeof(stl_facet) >= SIZEOF_STL_FACET, "size of stl_facet incorrect");
|
||||
#endif
|
||||
|
||||
typedef enum {binary, ascii, inmemory} stl_type;
|
||||
|
||||
@ -100,7 +106,9 @@ typedef struct stl_hash_edge {
|
||||
struct stl_hash_edge *next;
|
||||
} stl_hash_edge;
|
||||
|
||||
#ifdef static_assert
|
||||
static_assert(offsetof(stl_hash_edge, facet_number) == SIZEOF_EDGE_SORT, "size of stl_hash_edge.key incorrect");
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
// Index of a neighbor facet.
|
||||
|
@ -50,7 +50,7 @@ TriangleMesh::TriangleMesh(const TriangleMesh &other)
|
||||
|
||||
TriangleMesh& TriangleMesh::operator= (TriangleMesh other)
|
||||
{
|
||||
swap(*this, other);
|
||||
this->swap(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user