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

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;
}