Skip to content

Commit

Permalink
curve: Fix gcc compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
heinezen committed Jan 16, 2025
1 parent e7f656f commit e61ec89
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions libopenage/curve/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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;
};

/**
Expand Down Expand Up @@ -335,7 +335,7 @@ void Array<T, Size>::set_replace(const time::time_t &t,
template <typename T, size_t Size>
void Array<T, Size>::sync(const Array<T, Size> &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);
}

Expand Down
4 changes: 2 additions & 2 deletions libopenage/curve/tests/container.cpp
Original file line number Diff line number Diff line change
@@ -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 <algorithm>
#include <deque>
Expand Down Expand Up @@ -247,7 +247,7 @@ void test_array() {
auto f = std::make_shared<event::EventLoop>();

Array<int, 4> a(f, 0);
const std::array<int, 4> &default_val = std::array<int, 4>();
// const std::array<int, 4> &default_val = std::array<int, 4>();
a.set_insert(1, 0, 0);
a.set_insert(1, 1, 1);
a.set_insert(1, 2, 2);
Expand Down

0 comments on commit e61ec89

Please sign in to comment.