FIX: remove some warnings

jira: [none]
Change-Id: I0e74b7316d0efe38c65e1f695b2a09eb09103552
(cherry picked from commit 766c6e004145325bcc7a6addfce27842ee9504de)
This commit is contained in:
xin.zhang
2025-10-28 15:29:56 +08:00
committed by Noisyfox
parent fabc681442
commit 934f32bd8c
16 changed files with 36 additions and 32 deletions
+1 -1
View File
@@ -364,11 +364,11 @@ void AMSrefresh::create(wxWindow *parent, wxWindowID id, const wxPoint &pos, con
m_playing_timer = new wxTimer();
m_playing_timer->SetOwner(this);
wxPostEvent(this, wxTimerEvent());
SetSize(AMS_REFRESH_SIZE);
SetMinSize(AMS_REFRESH_SIZE);
SetMaxSize(AMS_REFRESH_SIZE);
Refresh();
}
void AMSrefresh::on_timer(wxTimerEvent &event)
+1 -1
View File
@@ -423,7 +423,7 @@ int DropDown::hoverIndex()
return hover_item;
int index = -1;
std::set<wxString> groups;
for (size_t i = 0; i < items.size(); ++i) {
for (int i = 0; i < items.size(); ++i) {
auto &item = items[i];
// Skip by group
if (group.IsEmpty()) {
-2
View File
@@ -190,7 +190,6 @@ inline wxColour darkModeColorFor2(wxColour const &color)
if (!gDarkMode)
return color;
auto iter = gDarkColors.find(color);
wxASSERT(iter != gDarkColors.end());
if (iter != gDarkColors.end()) return iter->second;
return color;
}
@@ -206,7 +205,6 @@ wxColour StateColor::lightModeColorFor(wxColour const &color)
{
static std::map<wxColour, wxColour> gLightColors = revert(gDarkColors);
auto iter = gLightColors.find(color);
wxASSERT(iter != gLightColors.end());
if (iter != gLightColors.end()) return iter->second;
return color;
}
+1 -1
View File
@@ -35,7 +35,7 @@ void StateHandler::attach_child(wxWindow *child)
void StateHandler::remove_child(wxWindow *child)
{
children_.erase(std::remove_if(children_.begin(), children_.end(),
children_.erase(std::remove_if(children_.begin(), children_.end(),
[child](auto &c) { return c->owner_ == child; }), children_.end());
states2_ = 0;
for (auto & c : children_) states2_ |= c->states();