]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/imagtga.cpp
wxWinCE compile fixes
[wxWidgets.git] / src / common / imagtga.cpp
index bf99b1af4cff216455598bc86f3a7e7a10fd99c3..281682cbb9f6773bdcb49d090d1011a649abfeae 100644 (file)
@@ -218,13 +218,10 @@ int ReadTGA(wxImage* image, wxInputStream& stream)
             b[i] = buf[0];
         }
 
-        #if wxUSE_PALETTE
-
+#if wxUSE_PALETTE
         // Set the palette of the image.
-
         image->SetPalette(wxPalette(paletteLength, r, g, b));
-
-        #endif // wxUSE_PALETTE
+#endif // wxUSE_PALETTE
 
         delete[] r;
         delete[] g;
@@ -235,6 +232,7 @@ int ReadTGA(wxImage* image, wxInputStream& stream)
 
     switch (imageType)
     {
+#if wxUSE_PALETTE
         // Raw indexed.
 
         case 1:
@@ -296,6 +294,7 @@ int ReadTGA(wxImage* image, wxInputStream& stream)
             }
         }
         break;
+#endif // wxUSE_PALETTE
 
         // Raw RGB.
 
@@ -428,6 +427,7 @@ int ReadTGA(wxImage* image, wxInputStream& stream)
         }
         break;
 
+#if wxUSE_PALETTE
         // RLE indexed.
 
         case 9:
@@ -489,6 +489,7 @@ int ReadTGA(wxImage* image, wxInputStream& stream)
             }
         }
         break;
+#endif // wxUSE_PALETTE
 
         // RLE RGB.