summary refs log tree commit diff
path: root/src/GFX/Mesh.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GFX/Mesh.hpp')
-rw-r--r--src/GFX/Mesh.hpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/GFX/Mesh.hpp b/src/GFX/Mesh.hpp
index 1d14ba2..ec21e53 100644
--- a/src/GFX/Mesh.hpp
+++ b/src/GFX/Mesh.hpp
@@ -17,18 +17,18 @@ public:
             attribute_size(S),
             type_size(sizeof(T)) {
             data = copy(v.data(), v.size() * S * type_size);
-        };
+        }
 
         Attribute(
             const Attribute& other
         ) : data(copy(other.data, other.data_size * other.attribute_size * other.type_size)),
             data_size(other.data_size),
             attribute_size(other.attribute_size),
-            type_size(other.type_size) {};
+            type_size(other.type_size) {}
 
         static void* copy(void* ptr, uint32_t size) {
             auto* buffer = new uint8_t[size];
-            std::copy((uint8_t*)ptr, (uint8_t*)ptr + size, buffer);
+            std::copy_n((uint8_t*)ptr, size, buffer);
             return buffer;
         }
 
@@ -42,12 +42,11 @@ public:
         std::vector<Attribute> attributes,
         std::vector<uint32_t> indices
     ) : m_attributes(std::move(attributes)),
-        m_indices(std::move(indices)) {};
+        m_indices(std::move(indices)) {}
 
-    Mesh(
+    explicit Mesh(
         std::vector<Attribute> attributes
-    ) : m_attributes(std::move(attributes)),
-        m_indices() {};
+    ) : m_attributes(std::move(attributes)) {}
 
     const std::vector<uint32_t>& indices() const;
     const std::vector<Attribute>& attributes() const;