]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/resource.cpp
more waste of time fixing uncompilable code
[wxWidgets.git] / src / common / resource.cpp
index 436565d0ed2c7220c76ebf0fa6a5036fa4396980..031a211c74df3753e26ec98207bcbd638238b8d6 100644 (file)
@@ -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;