Skip to content

Commit

Permalink
Fix gcc compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyschoen committed Feb 14, 2025
1 parent 0cdc49d commit 9ea71ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Source/Objects/ArrayObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class GraphicalArray final : public Component
auto const* pointPtr = points.data();
auto const numPoints = points.size();

StackArray<float, 6> control;
StackArray<float, 6> control = {0};
Path result;
if (std::isfinite(pointPtr[0])) {
result.startNewSubPath(0, pointPtr[0]);
Expand Down
16 changes: 8 additions & 8 deletions Source/Objects/FunctionObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class FunctionObject final : public ObjectBase {
triggerOutput();
}

std::pair<float, float> getRange() const
Range<float> getRange() const
{
auto const& arr = *range.getValue().getArray();

Expand All @@ -271,17 +271,17 @@ class FunctionObject final : public ObjectBase {

return { start, end };
}
void setRange(std::pair<float, float> const& newRange)
void setRange(Range<float> const& newRange)
{
auto const& arr = *range.getValue().getArray();
arr[0] = newRange.first;
arr[1] = newRange.second;
arr[0] = newRange.getStart();
arr[1] = newRange.getEnd();

if (auto function = ptr.get<t_fake_function>()) {
if (newRange.first <= function->x_min_point)
function->x_min = newRange.first;
if (newRange.second >= function->x_max_point)
function->x_max = newRange.second;
if (newRange.getStart() <= function->x_min_point)
function->x_min = newRange.getStart();
if (newRange.getEnd() >= function->x_max_point)
function->x_max = newRange.getEnd();
}
}

Expand Down

0 comments on commit 9ea71ec

Please sign in to comment.