]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for BC++ internal compiler error
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 20 Nov 2001 17:01:17 +0000 (17:01 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 20 Nov 2001 17:01:17 +0000 (17:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/image/image.cpp

index 71540921bce3b10538ca3d302d9ec3c99d88f24f..706be54393544c02f9b0a26af79e886538ab6107 100644 (file)
@@ -66,8 +66,35 @@ private:
     DECLARE_EVENT_TABLE()
 };
 
+
+const int nChoices = 8 ;
+static const wxString bppchoices[nChoices] =
+{
+    "1 bpp color",
+    "1 bpp B&W",
+    "4 bpp color",
+    "8 bpp color",
+    "8 bpp greyscale",
+    "8 bpp red",
+    "8 bpp own palette",
+    "24 bpp"
+};
+
+static const int bppvalues[nChoices] =
+{
+    wxBMP_1BPP,
+    wxBMP_1BPP_BW,
+    wxBMP_4BPP,
+    wxBMP_8BPP,
+    wxBMP_8BPP_GREY,
+    wxBMP_8BPP_RED,
+    wxBMP_8BPP_PALETTE,
+    wxBMP_24BPP
+};
+
 // MyFrame
 
+
 class MyFrame: public wxFrame
 {
 public:
@@ -106,33 +133,9 @@ public:
     {
         wxImage image(m_bitmap);
 
-        static const wxString bppchoices[8] =
-        {
-            "1 bpp color",
-            "1 bpp B&W",
-            "4 bpp color",
-            "8 bpp color",
-            "8 bpp greyscale",
-            "8 bpp red",
-            "8 bpp own palette",
-            "24 bpp"
-        };
-
-        static const int bppvalues[WXSIZEOF(bppchoices)] =
-        {
-            wxBMP_1BPP,
-            wxBMP_1BPP_BW,
-            wxBMP_4BPP,
-            wxBMP_8BPP,
-            wxBMP_8BPP_GREY,
-            wxBMP_8BPP_RED,
-            wxBMP_8BPP_PALETTE,
-            wxBMP_24BPP
-        };
-
         int bppselection = wxGetSingleChoiceIndex("Set BMP BPP",
                                                   "Set BMP BPP",
-                                                  WXSIZEOF(bppchoices),
+                                                  nChoices,
                                                   bppchoices,
                                                   this);
         if ( bppselection == -1 )