From f8c5570155e9a36a28c2147a95c1404d1c7a9f75 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 14 Jun 2019 15:47:40 +0200 Subject: [PATCH] Removed unnecessary copy / move constructors / assignment operators. --- src/PrusaSlicer_app_msvc.cpp | 1 - src/admesh/stl.h | 8 -------- src/libslic3r/TriangleMesh.hpp | 4 ---- 3 files changed, 13 deletions(-) diff --git a/src/PrusaSlicer_app_msvc.cpp b/src/PrusaSlicer_app_msvc.cpp index ee8cdf696..95dd4fb07 100644 --- a/src/PrusaSlicer_app_msvc.cpp +++ b/src/PrusaSlicer_app_msvc.cpp @@ -8,7 +8,6 @@ #include #ifdef SLIC3R_GUI -//Turn on high power graphics for NVidia cards on laptops (with built in graphics cards + Nvidia cards) extern "C" { // Let the NVIDIA and AMD know we want to use their graphics card diff --git a/src/admesh/stl.h b/src/admesh/stl.h index 87210b3c9..2ac6c7fd2 100644 --- a/src/admesh/stl.h +++ b/src/admesh/stl.h @@ -120,10 +120,6 @@ struct stl_stats { struct stl_file { stl_file() {} - stl_file(const stl_file &rhs) : facet_start(rhs.facet_start), neighbors_start(rhs.neighbors_start), stats(rhs.stats) {} - stl_file(stl_file &&rhs) : facet_start(std::move(rhs.facet_start)), neighbors_start(std::move(rhs.neighbors_start)), stats(rhs.stats) {} - stl_file& operator=(const stl_file &rhs) { this->facet_start = rhs.facet_start; this->neighbors_start = rhs.neighbors_start; this->stats = rhs.stats; return *this; } - stl_file& operator=(stl_file &&rhs) { this->facet_start = std::move(rhs.facet_start); this->neighbors_start = std::move(rhs.neighbors_start); this->stats = rhs.stats; return *this; } void clear() { this->facet_start.clear(); @@ -140,10 +136,6 @@ struct stl_file { struct indexed_triangle_set { indexed_triangle_set() {} - indexed_triangle_set(const indexed_triangle_set &rhs) : indices(rhs.indices), vertices(rhs.vertices) {} - indexed_triangle_set(indexed_triangle_set &&rhs) : indices(std::move(rhs.indices)), vertices(std::move(rhs.vertices)) {} - indexed_triangle_set& operator=(const indexed_triangle_set &rhs) { this->indices = rhs.indices; this->vertices = rhs.vertices; return *this; } - indexed_triangle_set& operator=(indexed_triangle_set &&rhs) { this->indices = std::move(rhs.indices); this->vertices = std::move(rhs.vertices); return *this; } void clear() { indices.clear(); vertices.clear(); } diff --git a/src/libslic3r/TriangleMesh.hpp b/src/libslic3r/TriangleMesh.hpp index 54c6dc5d0..054a98935 100644 --- a/src/libslic3r/TriangleMesh.hpp +++ b/src/libslic3r/TriangleMesh.hpp @@ -23,10 +23,6 @@ class TriangleMesh public: TriangleMesh() : repaired(false) {} TriangleMesh(const Pointf3s &points, const std::vector &facets); - TriangleMesh(const TriangleMesh& rhs) : stl(rhs.stl), its(rhs.its), repaired(rhs.repaired) {} - TriangleMesh(TriangleMesh&& rhs) : stl(std::move(rhs.stl)), its(std::move(rhs.its)), repaired(rhs.repaired) {} - TriangleMesh& operator=(const TriangleMesh& rhs) { this->stl = rhs.stl; this->its = rhs.its; this->repaired = rhs.repaired; return *this; } - TriangleMesh& operator=(TriangleMesh &&rhs) { this->stl = std::move(rhs.stl); this->its = std::move(rhs.its); this->repaired = rhs.repaired; return *this; } void clear() { this->stl.clear(); this->its.clear(); this->repaired = false; } bool ReadSTLFile(const char* input_file) { return stl_open(&stl, input_file); } bool write_ascii(const char* output_file) { return stl_write_ascii(&this->stl, output_file, ""); }