Fix warnings

C++20
uramer 3 years ago
parent a972a54ea9
commit e78b8402fa

@ -729,7 +729,8 @@ namespace MWGui
void SettingsWindow::renderScriptSettings()
{
LuaUi::attachToWidget(mCurrentPage);
if (mCurrentPage >= 0)
LuaUi::attachToWidget(mCurrentPage);
mCurrentPage = -1;
mScriptList->removeAllItems();
mScriptView->setCanvasSize({0, 0});
@ -756,12 +757,12 @@ namespace MWGui
mScriptBox->setVisible(!disabled);
}
void SettingsWindow::onScriptFilterChange(MyGUI::Widget*)
void SettingsWindow::onScriptFilterChange(MyGUI::EditBox*)
{
renderScriptSettings();
}
void SettingsWindow::onScriptListSelection(MyGUI::Widget*, size_t index)
void SettingsWindow::onScriptListSelection(MyGUI::ListBox*, size_t index)
{
if (mCurrentPage >= 0)
LuaUi::attachToWidget(mCurrentPage);

@ -78,8 +78,8 @@ namespace MWGui
void onWindowResize(MyGUI::Window* _sender);
void onScriptFilterChange(MyGUI::Widget*);
void onScriptListSelection(MyGUI::Widget*, size_t index);
void onScriptFilterChange(MyGUI::EditBox*);
void onScriptListSelection(MyGUI::ListBox*, size_t index);
void apply();

@ -28,7 +28,7 @@ namespace LuaUi
void attachToWidget(size_t index, MyGUI::Widget* widget)
{
if (0 <= index && index < allSettings.size())
if (index < allSettings.size())
allSettings[index].mElement->attachToWidget(widget);
}
}

@ -9,7 +9,7 @@
namespace LuaUi
{
class Element;
struct Element;
struct ScriptSettings
{
std::string mName;

Loading…
Cancel
Save