Fix wxWidgets debugging macros (#1742)

wxFAIL will always generate an assert error and does not expect a
condition.
This commit is contained in:
Alexander Sulfrian 2023-08-09 17:25:25 +02:00 committed by GitHub
parent e02e8c6f15
commit c1e85db46e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,7 @@ inline wxColour darkModeColorFor2(wxColour const &color)
if (!gDarkMode)
return color;
auto iter = gDarkColors.find(color);
wxFAIL(iter != gDarkColors.end());
wxASSERT(iter != gDarkColors.end());
if (iter != gDarkColors.end()) return iter->second;
return color;
}
@ -69,7 +69,7 @@ wxColour StateColor::lightModeColorFor(wxColour const &color)
{
static std::map<wxColour, wxColour> gLightColors = revert(gDarkColors);
auto iter = gLightColors.find(color);
wxFAIL(iter != gLightColors.end());
wxASSERT(iter != gLightColors.end());
if (iter != gLightColors.end()) return iter->second;
return color;
}