From e61ec89947176932b393bfeb4c777a973b6e7644 Mon Sep 17 00:00:00 2001 From: heinezen Date: Thu, 16 Jan 2025 04:31:39 +0100 Subject: [PATCH] curve: Fix gcc compiler warnings. --- libopenage/curve/array.h | 12 ++++++------ libopenage/curve/tests/container.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libopenage/curve/array.h b/libopenage/curve/array.h index 857638f5e0..ea1cb71724 100644 --- a/libopenage/curve/array.h +++ b/libopenage/curve/array.h @@ -197,11 +197,6 @@ class Array : event::EventEntity { } private: - /** - * used to index the Curve::Array pointed to by this iterator - */ - size_t offset; - /** * the curve object that this iterator, iterates over */ @@ -211,6 +206,11 @@ class Array : event::EventEntity { * time at which this iterator is iterating over */ time::time_t time; + + /** + * used to index the Curve::Array pointed to by this iterator + */ + size_t offset; }; /** @@ -335,7 +335,7 @@ void Array::set_replace(const time::time_t &t, template void Array::sync(const Array &other, const time::time_t &start) { - for (int i = 0; i < Size; i++) { + for (index_t i = 0; i < Size; i++) { this->containers[i].sync(other.containers[i], start); } diff --git a/libopenage/curve/tests/container.cpp b/libopenage/curve/tests/container.cpp index 8aed3c8d05..48a3b19202 100644 --- a/libopenage/curve/tests/container.cpp +++ b/libopenage/curve/tests/container.cpp @@ -1,4 +1,4 @@ -// Copyright 2017-2024 the openage authors. See copying.md for legal info. +// Copyright 2017-2025 the openage authors. See copying.md for legal info. #include #include @@ -247,7 +247,7 @@ void test_array() { auto f = std::make_shared(); Array a(f, 0); - const std::array &default_val = std::array(); + // const std::array &default_val = std::array(); a.set_insert(1, 0, 0); a.set_insert(1, 1, 1); a.set_insert(1, 2, 2);