Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
scheffle committed Mar 22, 2024
1 parent 20061c5 commit 32dcd37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions vstgui/lib/ctexteditor.cpp
Expand Up @@ -655,8 +655,8 @@ void TextEditorView::parentSizeChanged ()
This->setViewSize (viewSize);
if (makeCursorVisible)
This->onCursorChanged (-1, This->md.editState.cursor);
This->md.editState.row_count_per_page =
This->getVisibleViewSize ().getHeight () / This->md.lineHeight;
This->md.editState.row_count_per_page = static_cast<int> (
std::ceil (This->getVisibleViewSize ().getHeight () / This->md.lineHeight));
};
auto frame = getFrame ();
if (frame && frame->inEventProcessing ())
Expand Down Expand Up @@ -1469,7 +1469,7 @@ void TextEditorView::insertNewLine () const
auto isWhiteSpace = [] (char16_t character) {
return character == u'\t' || character == u' ';
};
for (auto index = currentLine->range.start; index < cursor; ++index)
for (auto index = static_cast<int> (currentLine->range.start); index < cursor; ++index)
{
if (isWhiteSpace (md.model.text[index]))
{
Expand Down
3 changes: 2 additions & 1 deletion vstgui/lib/enumbitset.h
Expand Up @@ -127,7 +127,8 @@ struct EnumBitset
{
if constexpr (EnumIsBitMask)
return static_cast<value_type> (e);
return 1 << static_cast<value_type> (e);
else
return 1 << static_cast<value_type> (e);
}

value_type val {};
Expand Down

0 comments on commit 32dcd37

Please sign in to comment.