Skip to content

Commit

Permalink
fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
scheffle committed Jan 28, 2024
1 parent ad7535d commit 7031bd0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions vstgui/lib/ctexteditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ void TextEditorView::toggleCursorVisibility () const
}),
CubicBezierTimingFunction::make (md.cursorIsVisible ? CubicBezierTimingFunction::EasyOut
: CubicBezierTimingFunction::EasyIn,
md.style->cursorBlinkTime / 2.));
md.style->cursorBlinkTime / 2));
}

//------------------------------------------------------------------------
Expand Down Expand Up @@ -1701,7 +1701,8 @@ void TextEditorView::updateSelectionOnDoubleClickMove (uint32_t clickCount) cons
auto currentLine = findLine (md.model.lines.begin (), md.model.lines.end (), cursor);
if (currentLine != md.model.lines.end ())
{
if (currentLine->range.start >= md.editStateOnMouseDown.select_start)
if (currentLine->range.start >=
static_cast<size_t> (md.editStateOnMouseDown.select_start))
{
md.editState.select_start = md.editStateOnMouseDown.select_start;
md.editState.select_end = static_cast<int> (currentLine->range.end ());
Expand All @@ -1716,7 +1717,7 @@ void TextEditorView::updateSelectionOnDoubleClickMove (uint32_t clickCount) cons
return;
}

if (cursor < md.editStateOnMouseDown.select_start)
if (cursor < static_cast<size_t> (md.editStateOnMouseDown.select_start))
{
auto it = md.model.text.begin ();
std::advance (it, cursor - 1);
Expand Down Expand Up @@ -1907,7 +1908,7 @@ bool TextEditorView::doFind (bool forward) const
auto pos = String::npos;
if (forward)
{
auto cursor = md.editState.select_end;
auto cursor = static_cast<size_t> (md.editState.select_end);
if (cursor > md.model.text.length ())
cursor = 0;
auto text = StringView (md.model.text.data (), md.model.text.length ());
Expand Down

0 comments on commit 7031bd0

Please sign in to comment.