X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3d05544e4e71e7ff10984dae5a9b8a07d92f42a6..1eddcfafba914bff0c9674985d5c8a7205a741c6:/src/common/resource.cpp diff --git a/src/common/resource.cpp b/src/common/resource.cpp index 436565d0ed..031a211c74 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -559,17 +559,33 @@ bool wxResourceInterpretResources(wxResourceTable& table, wxExprDatabase& db) return TRUE; } -static char *g_ValidControlClasses[] = { "wxButton", "wxBitmapButton", "wxMessage", - "wxStaticText", "wxStaticBitmap", "wxText", "wxTextCtrl", "wxMultiText", - "wxListBox", "wxRadioBox", "wxRadioButton", "wxCheckBox", "wxBitmapCheckBox", - "wxGroupBox", "wxStaticBox", "wxSlider", "wxGauge", "wxScrollBar", - "wxChoice", "wxComboBox" } ; -static int g_ValidControlClassesCount = sizeof(g_ValidControlClasses) / sizeof(char *) ; +static const char *g_ValidControlClasses[] = +{ + "wxButton", + "wxBitmapButton", + "wxMessage", + "wxStaticText", + "wxStaticBitmap", + "wxText", + "wxTextCtrl", + "wxMultiText", + "wxListBox", + "wxRadioBox", + "wxRadioButton", + "wxCheckBox", + "wxBitmapCheckBox", + "wxGroupBox", + "wxStaticBox", + "wxSlider", + "wxGauge", + "wxScrollBar", + "wxChoice", + "wxComboBox" +}; static bool wxIsValidControlClass(const wxString& c) { - int i; - for ( i = 0; i < g_ValidControlClassesCount; i++) + for ( size_t i = 0; i < WXSIZEOF(g_ValidControlClasses); i++ ) { if ( c == g_ValidControlClasses[i] ) return TRUE;