1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-10-19 05:46:39 +00:00

Fix GCC warning

This commit is contained in:
Andrew Lanzone 2025-07-03 14:47:34 -07:00
parent ee33424c20
commit 088b2d1bbc

View file

@ -927,7 +927,7 @@ namespace MWGui
void DialogueWindow::setControllerFocus(size_t index, bool focused) void DialogueWindow::setControllerFocus(size_t index, bool focused)
{ {
// List is mTopicsList + "Goodbye" button below the list. // List is mTopicsList + "Goodbye" button below the list.
if (index < 0 || index > mTopicsList->getItemCount()) if (index > mTopicsList->getItemCount())
return; return;
if (index == mTopicsList->getItemCount()) if (index == mTopicsList->getItemCount())
@ -952,7 +952,7 @@ namespace MWGui
else else
{ {
int offset = 0; int offset = 0;
for (size_t i = 0; i < index - 8; i++) for (int i = 0; i < static_cast<int>(index) - 8; i++)
{ {
const std::string& keyword = mTopicsList->getItemNameAt(i); const std::string& keyword = mTopicsList->getItemNameAt(i);
if (keyword.empty()) if (keyword.empty())