X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80fdcdb90ef779185492dab676d461fc34933312..cc4d5638c66a409e421420ed7110917755a66788:/src/common/imagtga.cpp?ds=sidebyside diff --git a/src/common/imagtga.cpp b/src/common/imagtga.cpp index b5a583157e..ec0362192e 100644 --- a/src/common/imagtga.cpp +++ b/src/common/imagtga.cpp @@ -2,7 +2,6 @@ // Name: src/common/imagtga.cpp // Purpose: wxImage TGA handler // Author: Seth Jackson -// CVS-ID: $Id$ // Copyright: (c) 2005 Seth Jackson // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -227,7 +226,7 @@ int ReadTGA(wxImage* image, wxInputStream& stream) image->Create(width, height); - if (!image->Ok()) + if (!image->IsOk()) { return wxTGA_MEMERR; } @@ -292,9 +291,9 @@ int ReadTGA(wxImage* image, wxInputStream& stream) case 1: { - unsigned char r; - unsigned char g; - unsigned char b; + unsigned char r = 0; + unsigned char g = 0; + unsigned char b = 0; // No compression read the data directly to imageData. @@ -486,9 +485,9 @@ int ReadTGA(wxImage* image, wxInputStream& stream) case 9: { - unsigned char r; - unsigned char g; - unsigned char b; + unsigned char r = 0; + unsigned char g = 0; + unsigned char b = 0; // Decode the RLE data. @@ -846,7 +845,7 @@ bool wxTGAHandler::DoCanRead(wxInputStream& stream) unsigned char hdr[HDR_SIZE]; stream.Read(hdr, HDR_SIZE); // it's ok to modify the stream position here - // Check wether we can read the file or not. + // Check whether we can read the file or not. short colorType = hdr[HDR_COLORTYPE]; if ( colorType != wxTGA_UNMAPPED && colorType != wxTGA_MAPPED )