Skip to content

Commit

Permalink
Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
FigBug committed Feb 14, 2024
1 parent 56c8dd1 commit 1107e20
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/gin_plugin/components/gin_msegcomponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ void MSEGComponent::resized()
dirty = true;
}

void MSEGComponent::setDrawMode (bool enable, DrawMode m)
void MSEGComponent::setDrawMode (bool d, DrawMode m)
{
draw = enable;
draw = d;
drawMode = m;
}

Expand Down Expand Up @@ -512,14 +512,14 @@ void MSEGComponent::mouseDownDraw (const juce::MouseEvent& e)

void MSEGComponent::mouseDragDraw (const juce::MouseEvent& e)
{
auto t1 = std::clamp (std::floor (xToTime (e.x) * xgrid->getUserValueInt()) / xgrid->getUserValueInt(), 0.0f, 1.0f);
auto t2 = std::clamp (std::ceil (xToTime (e.x) * xgrid->getUserValueInt()) / xgrid->getUserValueInt(), 0.0f, 1.0f);
auto t1 = std::clamp (std::floor (xToTime (e.position.x) * xgrid->getUserValueInt()) / xgrid->getUserValueInt(), 0.0f, 1.0f);
auto t2 = std::clamp (std::ceil (xToTime (e.position.x) * xgrid->getUserValueInt()) / xgrid->getUserValueInt(), 0.0f, 1.0f);

if (t2 <= t1)
return;

auto v1 = mseg.getValueAt (t1 - 0.0001);
auto v2 = mseg.getValueAt (t2 + 0.0001);
auto v1 = mseg.getValueAt (t1 - 0.0001f);
auto v2 = mseg.getValueAt (t2 + 0.0001f);

deletePointsIn (t1, t2);

Expand Down

0 comments on commit 1107e20

Please sign in to comment.