diff --git a/glfw/glow-extras/glfw/GlfwApp.cc b/glfw/glow-extras/glfw/GlfwApp.cc index a8d4793bfc2b1a36e80578670f31f31b10d85867..fb600f2ffef55f857332004fe5d7ccbaf345a0f1 100644 --- a/glfw/glow-extras/glfw/GlfwApp.cc +++ b/glfw/glow-extras/glfw/GlfwApp.cc @@ -460,15 +460,15 @@ void GlfwApp::mainLoop() { // Loop until the user closes the window - unsigned frames = 0; + [[maybe_unused]] unsigned frames = 0; double lastTime = glfwGetTime(); [[maybe_unused]] double lastStatsTime = lastTime; double lastScheduledUpdateTime = lastTime; double timeAccum = 0.000001; mCurrentTime = 0.0; - size_t primitives = 0; - size_t fragments = 0; - double cpuRenderTime = 0; + [[maybe_unused]] size_t primitives = 0; + [[maybe_unused]] size_t fragments = 0; + [[maybe_unused]] double cpuRenderTime = 0; int updatesPerFrame = 1; mCurrentRenderDeltaTime = 1.0 / mUpdateRate; // tracks time between renders, init is for first frame only while (!shouldClose()) diff --git a/vector/glow-extras/vector/graphics2D.hh b/vector/glow-extras/vector/graphics2D.hh index 9e6248547a3542b556e7eaf2d7cf64aa15062020..0e2172f3c5115afe89ad9d4516115ce4c92f9b4a 100644 --- a/vector/glow-extras/vector/graphics2D.hh +++ b/vector/glow-extras/vector/graphics2D.hh @@ -47,7 +47,7 @@ struct font2D float line_height = 1.f; font2D(char const* face) : face(face) {} - font2D(std::string face, float size = 16.f, text_align align = text_align::baseline_left) : face(move(face)), size(size), align(align) {} + font2D(std::string face, float size = 16.f, text_align align = text_align::baseline_left) : face(std::move(face)), size(size), align(align) {} }; /// High-level API for writing to images diff --git a/viewer/glow-extras/viewer/canvas.hh b/viewer/glow-extras/viewer/canvas.hh index 053c9c0ee1fc9bd7185e4603e64f0d703345456a..91db69a1dc06ba7387be9a23d400b7b667116fea 100644 --- a/viewer/glow-extras/viewer/canvas.hh +++ b/viewer/glow-extras/viewer/canvas.hh @@ -1192,7 +1192,7 @@ public: auto start_cnt = _state.lines_curr->size(); float current_length = segment_length; PosT prev_position = bezier.control_points[0]; - int segment_counter = 0; + [[maybe_unused]] int segment_counter = 0; while (current_length <= 1.0f) { diff --git a/viewer/glow-extras/viewer/detail/MeshAttribute.hh b/viewer/glow-extras/viewer/detail/MeshAttribute.hh index bb67ebae5aada100884e550e3182c58df926d1e4..3aad9e4770568e7ff4dbe816244e469a8322b416 100644 --- a/viewer/glow-extras/viewer/detail/MeshAttribute.hh +++ b/viewer/glow-extras/viewer/detail/MeshAttribute.hh @@ -35,7 +35,7 @@ class MeshAttribute public: std::string const& name() const { return mName; } - MeshAttribute(std::string name) : mName(move(name)) {} + MeshAttribute(std::string name) : mName(std::move(name)) {} virtual SharedArrayBuffer createMeshRenderableArrayBuffer(MeshDefinition&) { @@ -86,7 +86,7 @@ public: T mConstant; - ConstantMeshAttribute(std::string name, T const& constant) : MeshAttribute(move(name)), mConstant(constant) {} + ConstantMeshAttribute(std::string name, T const& constant) : MeshAttribute(std::move(name)), mConstant(constant) {} SharedArrayBuffer createMeshRenderableArrayBuffer(MeshDefinition&) override { return nullptr; } // works SharedArrayBuffer createLineRenderableArrayBuffer(MeshDefinition&) override { return nullptr; } // works @@ -185,7 +185,7 @@ public: throw std::logic_error("Mesh type " + std::string(typeid(mesh).name()) + " not supported"); } - VertexMeshAttribute(std::string name, polymesh::vertex_attribute<T> const& data) : MeshAttribute(move(name)) + VertexMeshAttribute(std::string name, polymesh::vertex_attribute<T> const& data) : MeshAttribute(std::move(name)) { polymesh::Mesh const& mesh = data.mesh(); mMeshInfo = make_mesh_info(mesh); @@ -194,12 +194,12 @@ public: for (auto v : mesh.all_vertices()) mData.push_back(data[v]); } - VertexMeshAttribute(std::string name, std::vector<T> const& data) : MeshAttribute(move(name)) + VertexMeshAttribute(std::string name, std::vector<T> const& data) : MeshAttribute(std::move(name)) { mMeshInfo.vertexCount = data.size(); mData = data; } - VertexMeshAttribute(std::string name, std::vector<std::vector<T>> const& data) : MeshAttribute(move(name)) + VertexMeshAttribute(std::string name, std::vector<std::vector<T>> const& data) : MeshAttribute(std::move(name)) { mMeshInfo.vertexCount = 0; @@ -211,7 +211,7 @@ public: } } template <int N> - VertexMeshAttribute(std::string name, std::vector<std::array<T, N>> const& data) : MeshAttribute(move(name)) + VertexMeshAttribute(std::string name, std::vector<std::array<T, N>> const& data) : MeshAttribute(std::move(name)) { mMeshInfo.vertexCount = 0; @@ -306,7 +306,7 @@ public: throw std::logic_error("Mesh type " + std::string(typeid(mesh).name()) + " not supported"); } - EdgeMeshAttribute(std::string name, polymesh::edge_attribute<T> const& data) : MeshAttribute(move(name)) + EdgeMeshAttribute(std::string name, polymesh::edge_attribute<T> const& data) : MeshAttribute(std::move(name)) { polymesh::Mesh const& mesh = data.mesh(); mMeshInfo = make_mesh_info(mesh); @@ -315,7 +315,7 @@ public: for (auto e : mesh.all_edges()) mData.push_back(data[e]); } - EdgeMeshAttribute(std::string name, std::vector<T> const& data) : MeshAttribute(move(name)) + EdgeMeshAttribute(std::string name, std::vector<T> const& data) : MeshAttribute(std::move(name)) { mMeshInfo.edgeCount = data.size(); mData = data; @@ -425,7 +425,7 @@ public: throw std::logic_error("Mesh type " + std::string(typeid(mesh).name()) + " not supported"); } - FaceMeshAttribute(std::string name, polymesh::face_attribute<T> const& data) : MeshAttribute(move(name)) + FaceMeshAttribute(std::string name, polymesh::face_attribute<T> const& data) : MeshAttribute(std::move(name)) { polymesh::Mesh const& mesh = data.mesh(); mMeshInfo = make_mesh_info(mesh); @@ -434,7 +434,7 @@ public: for (auto f : mesh.all_faces()) mData.push_back(data[f]); } - FaceMeshAttribute(std::string name, std::vector<T> const& data) : MeshAttribute(move(name)) + FaceMeshAttribute(std::string name, std::vector<T> const& data) : MeshAttribute(std::move(name)) { mMeshInfo.faceCount = data.size(); mData = data; @@ -521,7 +521,7 @@ public: throw std::logic_error("Mesh type " + std::string(typeid(mesh).name()) + " not supported"); } - HalfedgeMeshAttribute(std::string name, polymesh::halfedge_attribute<T> const& data) : MeshAttribute(move(name)) + HalfedgeMeshAttribute(std::string name, polymesh::halfedge_attribute<T> const& data) : MeshAttribute(std::move(name)) { polymesh::Mesh const& mesh = data.mesh(); mMeshInfo = make_mesh_info(mesh); @@ -530,7 +530,7 @@ public: for (auto h : mesh.all_halfedges()) mData.push_back(data[h]); } - HalfedgeMeshAttribute(std::string name, std::vector<T> const& data) : MeshAttribute(move(name)) + HalfedgeMeshAttribute(std::string name, std::vector<T> const& data) : MeshAttribute(std::move(name)) { mMeshInfo.edgeCount = data.size() / 2; mData = data; @@ -717,7 +717,7 @@ public: throw std::logic_error("Mesh type " + std::string(typeid(mesh).name()) + " not supported"); } - RawMeshAttribute(std::string name, std::vector<T> const& data) : MeshAttribute(move(name)) { mData = data; } + RawMeshAttribute(std::string name, std::vector<T> const& data) : MeshAttribute(std::move(name)) { mData = data; } float computeMaxFloat() override { diff --git a/viewer/glow-extras/viewer/materials/Texturing.hh b/viewer/glow-extras/viewer/materials/Texturing.hh index 291e9a77f3aadf9f0e51284b5c706be2032f4b48..851ac48119a5d9560c195b6642af57cd25a6bdd9 100644 --- a/viewer/glow-extras/viewer/materials/Texturing.hh +++ b/viewer/glow-extras/viewer/materials/Texturing.hh @@ -20,7 +20,7 @@ class Texturing { SharedTexture mTexture; - ExplicitTexture(SharedTexture tex) : mTexture(move(tex)) {} + ExplicitTexture(SharedTexture tex) : mTexture(std::move(tex)) {} SharedTexture queryTexture() const override { return mTexture; } }; @@ -38,7 +38,7 @@ public: Texturing& texture(SharedTexture t) { - mTexture = std::make_shared<ExplicitTexture>(move(t)); + mTexture = std::make_shared<ExplicitTexture>(std::move(t)); return *this; } template <class T> diff --git a/viewer/glow-extras/viewer/renderables/GeometricRenderable.cc b/viewer/glow-extras/viewer/renderables/GeometricRenderable.cc index 7cc7761c82b9fa410c8fca7e4ae2eb305c1455aa..822bb33f4406c71cbd94e3147b8d269c8e320626 100644 --- a/viewer/glow-extras/viewer/renderables/GeometricRenderable.cc +++ b/viewer/glow-extras/viewer/renderables/GeometricRenderable.cc @@ -12,7 +12,7 @@ void GeometricRenderable::addAttribute(viewer::detail::SharedMeshAttribute attr) glow::error() << "Attribute " << attr->name() << " already added"; return; } - mAttributes.emplace_back(move(attr)); + mAttributes.emplace_back(std::move(attr)); } bool GeometricRenderable::hasAttribute(const std::string& name) const @@ -37,13 +37,13 @@ void GeometricRenderable::initGeometry(viewer::detail::SharedMeshDefinition def, { TG_ASSERT(def != nullptr); - mAttributes = move(attributes); + mAttributes = std::move(attributes); addAttribute(def->computePositionAttribute()); mIndexBuffer = def->computeIndexBuffer(); mMeshAABB = def->computeAABB(); - mMeshDefinition = move(def); + mMeshDefinition = std::move(def); } size_t GeometricRenderable::computeGenericGeometryHash() const diff --git a/viewer/glow-extras/viewer/renderables/QuadricRenderable.hh b/viewer/glow-extras/viewer/renderables/QuadricRenderable.hh index e2738797cf540aeda505d4fc8c067df1760f9a67..830dd4cba0284404d42d657c774c9e8f41b82932 100644 --- a/viewer/glow-extras/viewer/renderables/QuadricRenderable.hh +++ b/viewer/glow-extras/viewer/renderables/QuadricRenderable.hh @@ -34,7 +34,7 @@ struct boxed_quadric void invert() { quadric = -quadric; } private: - float _padding = 0; + [[maybe_unused]] float _padding = 0; }; static_assert(sizeof(boxed_quadric) == 28 * sizeof(float));