Source cleaning: whitespaces, tabs, -1/wxDefaultCoord/wxNOT_FOUND, TRUE/true, FALSE/false, !!/!IsEmpty().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-09-16 18:13:32 +00:00
parent 7b44c67058
commit 7beb59f36c
29 changed files with 888 additions and 888 deletions

View File

@@ -60,7 +60,7 @@ public:
// returns the first icon in the bundle
const wxIcon& GetIcon( const wxSize& size ) const;
// equivalent to GetIcon( wxSize( size, size ) )
const wxIcon& GetIcon( wxCoord size = -1 ) const
const wxIcon& GetIcon( wxCoord size = wxDefaultCoord ) const
{ return GetIcon( wxSize( size, size ) ); }
private:
// delete all icons

View File

@@ -63,8 +63,8 @@ public:
};
#if wxUSE_STREAMS
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool DoCanRead( wxInputStream& stream );
protected:
@@ -97,8 +97,8 @@ public:
};
#if wxUSE_STREAMS
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool DoLoadFile( wxImage *image, wxInputStream& stream, bool verbose, int index );
virtual bool DoCanRead( wxInputStream& stream );
virtual int GetImageCount( wxInputStream& stream );
@@ -152,8 +152,8 @@ public:
#if wxUSE_STREAMS
virtual bool SaveFile( wxImage *WXUNUSED(image), wxOutputStream& WXUNUSED(stream), bool WXUNUSED(verbose=TRUE) ){return FALSE ;};
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 );
virtual bool SaveFile( wxImage *WXUNUSED(image), wxOutputStream& WXUNUSED(stream), bool WXUNUSED(verbose=true) ){return false ;};
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool DoCanRead( wxInputStream& stream );
virtual int GetImageCount( wxInputStream& stream );
#endif // wxUSE_STREAMS

View File

@@ -52,8 +52,8 @@ public:
{ }
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual int GetImageCount( wxInputStream& stream );
@@ -138,7 +138,7 @@ class WXDLLEXPORT wxImage: public wxObject
public:
wxImage();
wxImage( int width, int height, bool clear = true );
wxImage( int width, int height, unsigned char* data, bool static_data = FALSE );
wxImage( int width, int height, unsigned char* data, bool static_data = false );
wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 );
wxImage( const wxString& name, const wxString& mimetype, int index = -1 );
@@ -151,7 +151,7 @@ public:
wxImage( const wxImage* image );
bool Create( int width, int height, bool clear = true );
bool Create( int width, int height, unsigned char* data, bool static_data = FALSE );
bool Create( int width, int height, unsigned char* data, bool static_data = false );
void Destroy();
// creates an identical copy of the image (the = operator
@@ -176,10 +176,10 @@ public:
// Rotates the image about the given point, 'angle' radians.
// Returns the rotated image, leaving this image intact.
wxImage Rotate(double angle, const wxPoint & centre_of_rotation,
bool interpolating = TRUE, wxPoint * offset_after_rotation = (wxPoint*) NULL) const;
bool interpolating = true, wxPoint * offset_after_rotation = (wxPoint*) NULL) const;
wxImage Rotate90( bool clockwise = TRUE ) const;
wxImage Mirror( bool horizontally = TRUE ) const;
wxImage Rotate90( bool clockwise = true ) const;
wxImage Mirror( bool horizontally = true ) const;
// replace one colour with another
void Replace( unsigned char r1, unsigned char g1, unsigned char b1,
@@ -251,7 +251,7 @@ public:
unsigned char GetMaskRed() const;
unsigned char GetMaskGreen() const;
unsigned char GetMaskBlue() const;
void SetMask( bool mask = TRUE );
void SetMask( bool mask = true );
bool HasMask() const;
#if wxUSE_PALETTE

View File

@@ -35,8 +35,8 @@ public:
}
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual bool DoCanRead( wxInputStream& stream );
#endif

View File

@@ -34,8 +34,8 @@ public:
}
#if wxUSE_STREAMS
virtual bool LoadFile(wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1);
virtual bool SaveFile(wxImage *image, wxOutputStream& stream, bool verbose=TRUE);
virtual bool LoadFile(wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1);
virtual bool SaveFile(wxImage *image, wxOutputStream& stream, bool verbose=true);
virtual bool DoCanRead(wxInputStream& stream);
#endif

View File

@@ -43,8 +43,8 @@ public:
}
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual bool DoCanRead( wxInputStream& stream );
#endif

View File

@@ -34,8 +34,8 @@ public:
}
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual bool DoCanRead( wxInputStream& stream );
#endif // wxUSE_STREAMS

View File

@@ -33,8 +33,8 @@ public:
}
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual bool DoCanRead( wxInputStream& stream );
#endif

View File

@@ -33,8 +33,8 @@ public:
}
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual bool DoCanRead( wxInputStream& stream );
#endif

View File

@@ -28,8 +28,8 @@ public:
wxTIFFHandler();
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual bool DoCanRead( wxInputStream& stream );
virtual int GetImageCount( wxInputStream& stream );
#endif

View File

@@ -33,8 +33,8 @@ public:
}
#if wxUSE_STREAMS
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 );
virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true );
virtual bool DoCanRead( wxInputStream& stream );
#endif

View File

@@ -77,7 +77,7 @@ public:
wxChar *WXUNUSED(data),
int WXUNUSED(size),
wxIPCFormat WXUNUSED(format) )
{ return FALSE; };
{ return false; };
virtual wxChar *OnRequest ( const wxString& WXUNUSED(topic),
const wxString& WXUNUSED(item),
@@ -90,15 +90,15 @@ public:
wxChar *WXUNUSED(data),
int WXUNUSED(size),
wxIPCFormat WXUNUSED(format) )
{ return FALSE; };
{ return false; };
virtual bool OnStartAdvise ( const wxString& WXUNUSED(topic),
const wxString& WXUNUSED(item) )
{ return FALSE; };
{ return false; };
virtual bool OnStopAdvise ( const wxString& WXUNUSED(topic),
const wxString& WXUNUSED(item) )
{ return FALSE; };
{ return false; };
// Callbacks to CLIENT - override at will
virtual bool OnAdvise ( const wxString& WXUNUSED(topic),
@@ -106,10 +106,10 @@ public:
wxChar *WXUNUSED(data),
int WXUNUSED(size),
wxIPCFormat WXUNUSED(format) )
{ return FALSE; };
{ return false; };
// Callbacks to BOTH - override at will
// Default behaviour is to delete connection and return TRUE
// Default behaviour is to delete connection and return true
virtual bool OnDisconnect(void) = 0;
// return a buffer at least this size, reallocating buffer if needed
@@ -137,7 +137,7 @@ public:
inline wxServerBase(void) {}
inline ~wxServerBase(void) {};
// Returns FALSE on error (e.g. port number is already in use)
// Returns false on error (e.g. port number is already in use)
virtual bool Create(const wxString& serverName) = 0;
// Callbacks to SERVER - override at will

View File

@@ -25,7 +25,7 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _ISQLEXT_H
# define _ISQLEXT_H
#define _ISQLEXT_H
#include "wx/isql.h"

View File

@@ -76,7 +76,7 @@ bool wxBMPHandler::SaveFile(wxImage *image,
wxOutputStream& stream,
bool verbose)
{
return SaveDib(image, stream, verbose, TRUE/*IsBmp*/, FALSE/*IsMask*/);
return SaveDib(image, stream, verbose, true/*IsBmp*/, false/*IsMask*/);
}
bool wxBMPHandler::SaveDib(wxImage *image,
@@ -86,13 +86,13 @@ bool wxBMPHandler::SaveDib(wxImage *image,
bool IsMask)
{
wxCHECK_MSG( image, FALSE, _T("invalid pointer in wxBMPHandler::SaveFile") );
wxCHECK_MSG( image, false, _T("invalid pointer in wxBMPHandler::SaveFile") );
if ( !image->Ok() )
{
if ( verbose )
wxLogError(_("BMP: Couldn't save invalid image."));
return FALSE;
return false;
}
// get the format of the BMP file to save, else use 24bpp
@@ -126,7 +126,7 @@ bool wxBMPHandler::SaveDib(wxImage *image,
{
if ( verbose )
wxLogError(_("BMP: wxImage doesn't have own wxPalette."));
return FALSE;
return false;
}
bpp = 8;
palette_size = 256;
@@ -201,7 +201,7 @@ bool wxBMPHandler::SaveDib(wxImage *image,
{
if (verbose)
wxLogError(_("BMP: Couldn't write the file (Bitmap) header."));
return FALSE;
return false;
}
}
if ( !IsMask )
@@ -222,7 +222,7 @@ bool wxBMPHandler::SaveDib(wxImage *image,
{
if (verbose)
wxLogError(_("BMP: Couldn't write the file (BitmapInfo) header."));
return FALSE;
return false;
}
}
@@ -301,7 +301,7 @@ bool wxBMPHandler::SaveDib(wxImage *image,
delete palette;
#endif // wxUSE_PALETTE
delete q_image;
return FALSE;
return false;
}
}
delete []rgbquad;
@@ -433,7 +433,7 @@ bool wxBMPHandler::SaveDib(wxImage *image,
delete palette;
#endif // wxUSE_PALETTE
delete q_image;
return FALSE;
return false;
}
}
delete[] buffer;
@@ -442,7 +442,7 @@ bool wxBMPHandler::SaveDib(wxImage *image,
#endif // wxUSE_PALETTE
delete q_image;
return TRUE;
return true;
}
@@ -474,7 +474,7 @@ bool wxBMPHandler::DoLoadDib(wxImage * image, int width, int height,
{
if (verbose)
wxLogError(_("BMP: Couldn't allocate memory."));
return FALSE;
return false;
}
}
else
@@ -492,7 +492,7 @@ bool wxBMPHandler::DoLoadDib(wxImage * image, int width, int height,
wxLogError( _("BMP: Couldn't allocate memory.") );
if ( cmap )
delete[] cmap;
return FALSE;
return false;
}
// Reading the palette, if it exists:
@@ -831,7 +831,7 @@ bool wxBMPHandler::DoLoadDib(wxImage * image, int width, int height,
delete[] cmap;
image->SetMask(FALSE);
image->SetMask(false);
const wxStreamError err = stream.GetLastError();
return err == wxSTREAM_NO_ERROR || err == wxSTREAM_EOF;
@@ -874,13 +874,13 @@ bool wxBMPHandler::LoadDib(wxImage *image, wxInputStream& stream,
{
if (verbose)
wxLogError( _("DIB Header: Image width > 32767 pixels for file.") );
return FALSE;
return false;
}
if ( height > 32767 )
{
if (verbose)
wxLogError( _("DIB Header: Image height > 32767 pixels for file.") );
return FALSE;
return false;
}
stream.Read(&aWord, 2);
@@ -894,7 +894,7 @@ bool wxBMPHandler::LoadDib(wxImage *image, wxInputStream& stream,
{
if (verbose)
wxLogError( _("DIB Header: Unknown bitdepth in file.") );
return FALSE;
return false;
}
stream.Read(dbuf, 4 * 4);
@@ -904,7 +904,7 @@ bool wxBMPHandler::LoadDib(wxImage *image, wxInputStream& stream,
{
if (verbose)
wxLogError( _("DIB Header: Unknown encoding in file.") );
return FALSE;
return false;
}
stream.Read(dbuf, 4 * 2);
@@ -918,16 +918,16 @@ bool wxBMPHandler::LoadDib(wxImage *image, wxInputStream& stream,
{
if (verbose)
wxLogError( _("DIB Header: Encoding doesn't match bitdepth.") );
return FALSE;
return false;
}
//read DIB; this is the BMP image or the XOR part of an icon image
if ( !DoLoadDib(image, width, height, bpp, ncolors, comp, offset, stream,
verbose, IsBmp, TRUE) )
verbose, IsBmp, true) )
{
if (verbose)
wxLogError( _("Error in reading image DIB .") );
return FALSE;
return false;
}
if ( !IsBmp )
@@ -936,24 +936,24 @@ bool wxBMPHandler::LoadDib(wxImage *image, wxInputStream& stream,
//there is no palette, so we will create one
wxImage mask;
if ( !DoLoadDib(&mask, width, height, 1, 2, BI_RGB, offset, stream,
verbose, IsBmp, FALSE) )
verbose, IsBmp, false) )
{
if (verbose)
wxLogError( _("ICO: Error in reading mask DIB.") );
return FALSE;
return false;
}
image->SetMaskFromImage(mask, 255, 255, 255);
}
return TRUE;
return true;
}
bool wxBMPHandler::LoadFile(wxImage *image, wxInputStream& stream,
bool verbose, int WXUNUSED(index))
{
// Read a single DIB fom the file:
return LoadDib(image, stream, verbose, TRUE/*isBmp*/);
return LoadDib(image, stream, verbose, true/*isBmp*/);
}
bool wxBMPHandler::DoCanRead(wxInputStream& stream)
@@ -961,7 +961,7 @@ bool wxBMPHandler::DoCanRead(wxInputStream& stream)
unsigned char hdr[2];
if ( !stream.Read(hdr, WXSIZEOF(hdr)) )
return FALSE;
return false;
// do we have the BMP file signature?
return hdr[0] == 'B' && hdr[1] == 'M';
@@ -1013,13 +1013,13 @@ bool wxICOHandler::SaveFile(wxImage *image,
{
if ( verbose )
wxLogError(_("ICO: Image too tall for an icon."));
return FALSE;
return false;
}
if ( image->GetWidth () > 255 )
{
if ( verbose )
wxLogError(_("ICO: Image too wide for an icon."));
return FALSE;
return false;
}
int images = 1; // only generate one image
@@ -1045,7 +1045,7 @@ bool wxICOHandler::SaveFile(wxImage *image,
{
if ( verbose )
wxLogError(_("ICO: Error writing the image file!"));
return FALSE;
return false;
}
// for each iamage write a description ICONDIRENTRY:
@@ -1094,8 +1094,8 @@ bool wxICOHandler::SaveFile(wxImage *image,
// monochome bitmap:
mask.SetOption(wxIMAGE_OPTION_BMP_FORMAT, wxBMP_1BPP_BW);
bool IsBmp = FALSE;
bool IsMask = FALSE;
bool IsBmp = false;
bool IsMask = false;
//calculate size and offset of image and mask
wxCountingOutputStream cStream;
@@ -1104,27 +1104,27 @@ bool wxICOHandler::SaveFile(wxImage *image,
{
if ( verbose )
wxLogError(_("ICO: Error writing the image file!"));
return FALSE;
return false;
}
IsMask = TRUE;
IsMask = true;
bResult = SaveDib(&mask, cStream, verbose, IsBmp, IsMask);
if ( !bResult )
{
if ( verbose )
wxLogError(_("ICO: Error writing the image file!"));
return FALSE;
return false;
}
wxUint32 Size = cStream.GetSize();
// wxCountingOutputStream::Ok() always returns TRUE for now and this
// wxCountingOutputStream::Ok() always returns true for now and this
// "if" provokes VC++ warnings in optimized build
#if 0
if ( !cStream.Ok() )
{
if ( verbose )
wxLogError(_("ICO: Error writing the image file!"));
return FALSE;
return false;
}
#endif // 0
@@ -1168,31 +1168,31 @@ bool wxICOHandler::SaveFile(wxImage *image,
{
if ( verbose )
wxLogError(_("ICO: Error writing the image file!"));
return FALSE;
return false;
}
// actually save it:
IsMask = FALSE;
IsMask = false;
bResult = SaveDib(image, stream, verbose, IsBmp, IsMask);
if ( !bResult )
{
if ( verbose )
wxLogError(_("ICO: Error writing the image file!"));
return FALSE;
return false;
}
IsMask = TRUE;
IsMask = true;
bResult = SaveDib(&mask, stream, verbose, IsBmp, IsMask);
if ( !bResult )
{
if ( verbose )
wxLogError(_("ICO: Error writing the image file!"));
return FALSE;
return false;
}
} // end of for loop
return TRUE;
return true;
}
bool wxICOHandler::LoadFile(wxImage *image, wxInputStream& stream,
@@ -1259,7 +1259,7 @@ bool wxICOHandler::DoLoadFile(wxImage *image, wxInputStream& stream,
// seek to selected icon:
pCurrentEntry = pIconDirEntry + iSel;
stream.SeekI(iPos + wxUINT32_SWAP_ON_BE(pCurrentEntry->dwImageOffset), wxFromStart);
bResult = LoadDib(image, stream, TRUE, IsBmp);
bResult = LoadDib(image, stream, true, IsBmp);
bool bIsCursorType = (this->GetType() == wxBITMAP_TYPE_CUR) || (this->GetType() == wxBITMAP_TYPE_ANI);
if ( bResult && bIsCursorType && nType == 2 )
{
@@ -1288,7 +1288,7 @@ bool wxICOHandler::DoCanRead(wxInputStream& stream)
stream.SeekI(0);
unsigned char hdr[4];
if ( !stream.Read(hdr, WXSIZEOF(hdr)) )
return FALSE;
return false;
// hdr[2] is one for an icon and two for a cursor
return hdr[0] == '\0' && hdr[1] == '\0' && hdr[2] == '\1' && hdr[3] == '\0';
@@ -1310,7 +1310,7 @@ bool wxCURHandler::DoCanRead(wxInputStream& stream)
stream.SeekI(0);
unsigned char hdr[4];
if ( !stream.Read(hdr, WXSIZEOF(hdr)) )
return FALSE;
return false;
// hdr[2] is one for an icon and two for a cursor
return hdr[0] == '\0' && hdr[1] == '\0' && hdr[2] == '\2' && hdr[3] == '\0';
@@ -1343,7 +1343,7 @@ bool wxANIHandler::LoadFile(wxImage *image, wxInputStream& stream,
stream.SeekI(0);
stream.Read(&FCC1, 4);
if ( FCC1 != riff32 )
return FALSE;
return false;
// we have a riff file:
while (stream.IsOk())
@@ -1375,7 +1375,7 @@ bool wxANIHandler::LoadFile(wxImage *image, wxInputStream& stream,
// try to read next data chunk:
stream.Read(&FCC1, 4);
}
return FALSE;
return false;
}
bool wxANIHandler::DoCanRead(wxInputStream& stream)
@@ -1394,16 +1394,16 @@ bool wxANIHandler::DoCanRead(wxInputStream& stream)
stream.SeekI(0);
if ( !stream.Read(&FCC1, 4) )
return FALSE;
return false;
if ( FCC1 != riff32 )
return FALSE;
return false;
// we have a riff file:
while ( stream.IsOk() )
{
if ( FCC1 == anih32 )
return TRUE;
return true;
// we always have a data size:
stream.Read(&datalen, 4);
datalen = wxINT32_SWAP_ON_BE(datalen) ;
@@ -1423,11 +1423,11 @@ bool wxANIHandler::DoCanRead(wxInputStream& stream)
if ( !stream.Read(&FCC1, 4) )
{
// reading failed -- either EOF or IO error, bail out anyhow
return FALSE;
return false;
}
}
return FALSE;
return false;
}
int wxANIHandler::GetImageCount(wxInputStream& stream)

View File

@@ -35,7 +35,7 @@
static bool LINKAGEMODE MatchPixel(wxImage *img, int x, int y, int w, int h, const wxColour& c)
{
if ((x<0)||(x>=w)||(y<0)||(y>=h)) return FALSE;
if ((x<0)||(x>=w)||(y<0)||(y>=h)) return false;
unsigned char r = img->GetRed(x,y);
unsigned char g = img->GetGreen(x,y);
@@ -45,16 +45,16 @@ static bool LINKAGEMODE MatchPixel(wxImage *img, int x, int y, int w, int h, con
static bool LINKAGEMODE MatchBoundaryPixel(wxImage *img, int x, int y, int w, int h, const wxColour & fill, const wxColour& bound)
{
if ((x<0)||(x>=w)||(y<0)||(y>=h)) return TRUE;
if ((x<0)||(x>=w)||(y<0)||(y>=h)) return true;
unsigned char r = img->GetRed(x,y);
unsigned char g = img->GetGreen(x,y);
unsigned char b = img->GetBlue(x,y);
if ( fill.Red() == r && fill.Green() == g && fill.Blue() == b )
return TRUE;
return true;
if ( bound.Red() == r && bound.Green() == g && bound.Blue() == b )
return TRUE;
return FALSE;
return true;
return false;
}
@@ -277,14 +277,14 @@ bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y,
const wxColour& col, int style)
{
if (dc->GetBrush().GetStyle() == wxTRANSPARENT)
return TRUE;
return true;
int height = 0;
int width = 0;
dc->GetSize(&width, &height);
//it would be nice to fail if we don't get a sensible size...
wxCHECK_MSG(width >= 1 && height >= 1, FALSE,
wxCHECK_MSG(width >= 1 && height >= 1, false,
wxT("In FloodFill, dc.GetSize routine failed, method not supported by this DC"));
//this is much faster than doing the individual pixels
@@ -302,7 +302,7 @@ bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y,
dc->Blit(0, 0, width, height, &memdc, 0, 0);
memdc.SelectObject(wxNullBitmap);
return TRUE;
return true;
}
#endif // wxUSE_IMAGE

View File

@@ -43,10 +43,10 @@ bool wxGIFHandler::LoadFile(wxImage *image, wxInputStream& stream,
{
wxGIFDecoder *decod;
int error;
bool ok = TRUE;
bool ok = true;
// image->Destroy();
decod = new wxGIFDecoder(&stream, TRUE);
decod = new wxGIFDecoder(&stream, true);
error = decod->ReadGIF();
if ((error != wxGIF_OK) && (error != wxGIF_TRUNCATED))
@@ -67,7 +67,7 @@ bool wxGIFHandler::LoadFile(wxImage *image, wxInputStream& stream,
}
}
delete decod;
return FALSE;
return false;
}
if ((error == wxGIF_TRUNCATED) && verbose)
@@ -83,7 +83,7 @@ bool wxGIFHandler::LoadFile(wxImage *image, wxInputStream& stream,
// accept an index of 0. (Instead GoFirstFrame() should be used)
// Also if the gif image has only one frame, calling GoFrame(0)
// fails because GoFrame() only works with gif animations.
// (It fails if IsAnimation() returns FALSE)
// (It fails if IsAnimation() returns false)
// All valid reasons to NOT call GoFrame when index equals 0.
if (index != 0)
{
@@ -111,7 +111,7 @@ bool wxGIFHandler::SaveFile( wxImage * WXUNUSED(image),
if (verbose)
wxLogDebug(wxT("GIF: the handler is read-only!!"));
return FALSE;
return false;
}
bool wxGIFHandler::DoCanRead( wxInputStream& stream )

View File

@@ -146,7 +146,7 @@ bool wxIFFDecoder::ConvertToImage(wxImage *image) const
image->Create(GetWidth(), GetHeight());
if (!image->Ok())
return FALSE;
return false;
unsigned char *pal = GetPalette();
unsigned char *src = GetData();
@@ -175,7 +175,7 @@ bool wxIFFDecoder::ConvertToImage(wxImage *image) const
image->SetMaskColour(255, 0, 255);
}
else
image->SetMask(FALSE);
image->SetMask(false);
#if wxUSE_PALETTE
if (pal && colors > 0)
@@ -207,7 +207,7 @@ bool wxIFFDecoder::ConvertToImage(wxImage *image) const
dst[2] = src[2];
}
return TRUE;
return true;
}
@@ -230,14 +230,14 @@ int wxIFFDecoder::GetTransparentColour() const { return m_image->transparent; }
//
// CanRead:
// Returns TRUE if the file looks like a valid IFF, FALSE otherwise.
// Returns true if the file looks like a valid IFF, false otherwise.
//
bool wxIFFDecoder::CanRead()
{
unsigned char buf[12];
if ( !m_f->Read(buf, WXSIZEOF(buf)) )
return FALSE;
return false;
m_f->SeekI(-(off_t)WXSIZEOF(buf), wxFromCurrent);
@@ -384,7 +384,7 @@ int wxIFFDecoder::ReadIFF()
// main decoding loop. searches IFF chunks and handles them.
// terminates when BODY chunk was found or dataptr ran over end of file
//
bool BMHDok = FALSE, CMAPok = FALSE, CAMGok = FALSE;
bool BMHDok = false, CMAPok = false, CAMGok = false;
int bmhd_width = 0, bmhd_height = 0, bmhd_bitplanes = 0, bmhd_transcol = -1;
byte bmhd_masking = 0, bmhd_compression = 0;
long camg_viewmode = 0;
@@ -414,7 +414,7 @@ int wxIFFDecoder::ReadIFF()
bmhd_masking = *(dataptr + 8 + 9);
bmhd_compression = *(dataptr + 8 + 10); // get compression
bmhd_transcol = iff_getword(dataptr + 8 + 12);
BMHDok = TRUE; // got BMHD
BMHDok = true; // got BMHD
dataptr += 8 + chunkLen; // to next chunk
}
else if (strncmp((char *)dataptr, "CMAP", 4) == 0) { // CMAP ?
@@ -445,14 +445,14 @@ int wxIFFDecoder::ReadIFF()
wxLogTrace(_T("iff"), _T("Read %d colors from IFF file."),
colors);
CMAPok = TRUE; // got CMAP
CMAPok = true; // got CMAP
dataptr += 8 + chunkLen; // to next chunk
} else if (strncmp((char *)dataptr, "CAMG", 4) == 0) { // CAMG ?
if (chunkLen < 4 || truncated) {
break;
}
camg_viewmode = iff_getlong(dataptr + 8); // get viewmodes
CAMGok = TRUE; // got CAMG
CAMGok = true; // got CAMG
dataptr += 8 + chunkLen; // to next chunk
}
else if (strncmp((char *)dataptr, "BODY", 4) == 0) { // BODY ?
@@ -763,7 +763,7 @@ bool wxIFFHandler::LoadFile(wxImage *image, wxInputStream& stream,
}
}
delete decod;
return FALSE;
return false;
}
if ((error == wxIFF_TRUNCATED) && verbose)
@@ -784,7 +784,7 @@ bool wxIFFHandler::SaveFile(wxImage * WXUNUSED(image),
if (verbose)
wxLogDebug(wxT("IFF: the handler is read-only!!"));
return FALSE;
return false;
}
bool wxIFFHandler::DoCanRead(wxInputStream& stream)

View File

@@ -226,7 +226,7 @@ bool wxJPEGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
(cinfo.src->term_source)(&cinfo);
jpeg_destroy_decompress(&cinfo);
if (image->Ok()) image->Destroy();
return FALSE;
return false;
}
jpeg_create_decompress( &cinfo );
@@ -239,9 +239,9 @@ bool wxJPEGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
if (!image->Ok()) {
jpeg_finish_decompress( &cinfo );
jpeg_destroy_decompress( &cinfo );
return FALSE;
return false;
}
image->SetMask( FALSE );
image->SetMask( false );
ptr = image->GetData();
stride = cinfo.output_width * 3;
tempbuf = (*cinfo.mem->alloc_sarray)
@@ -254,7 +254,7 @@ bool wxJPEGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
}
jpeg_finish_decompress( &cinfo );
jpeg_destroy_decompress( &cinfo );
return TRUE;
return true;
}
typedef struct {
@@ -338,7 +338,7 @@ bool wxJPEGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
if (verbose)
wxLogError(_("JPEG: Couldn't save image."));
jpeg_destroy_compress(&cinfo);
return FALSE;
return false;
}
jpeg_create_compress(&cinfo);
@@ -385,7 +385,7 @@ bool wxJPEGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
jpeg_finish_compress(&cinfo);
jpeg_destroy_compress(&cinfo);
return TRUE;
return true;
}
#ifdef __VISUALC__
@@ -397,7 +397,7 @@ bool wxJPEGHandler::DoCanRead( wxInputStream& stream )
unsigned char hdr[2];
if ( !stream.Read(hdr, WXSIZEOF(hdr)) )
return FALSE;
return false;
return hdr[0] == 0xFF && hdr[1] == 0xD8;
}

View File

@@ -108,7 +108,7 @@ void RLEdecode(unsigned char *p, unsigned int size, wxInputStream& s)
// If ((data & 0xC0) != 0xC0), then the value read is a data
// byte. Else, it is a counter (cont = val & 0x3F) and the
// next byte is the data byte.
//
if ((data & 0xC0) != 0xC0)
{
*(p++) = (unsigned char)data;
@@ -447,7 +447,7 @@ bool wxPCXHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
if (verbose)
wxLogError(_("PCX: this is not a PCX file."));
return FALSE;
return false;
}
image->Destroy();
@@ -465,10 +465,10 @@ bool wxPCXHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
}
}
image->Destroy();
return FALSE;
return false;
}
return TRUE;
return true;
}
bool wxPCXHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbose )
@@ -495,7 +495,7 @@ bool wxPCXHandler::DoCanRead( wxInputStream& stream )
{
unsigned char c = stream.GetC();
if ( !stream )
return FALSE;
return false;
// not very safe, but this is all we can get from PCX header :-(
return c == 10;

View File

@@ -321,7 +321,7 @@ bool wxPNGHandler::DoCanRead( wxInputStream& stream )
unsigned char hdr[4];
if ( !stream.Read(hdr, WXSIZEOF(hdr)) )
return FALSE;
return false;
return memcmp(hdr, "\211PNG", WXSIZEOF(hdr)) == 0;
}
@@ -600,7 +600,7 @@ wxPNGHandler::LoadFile(wxImage *image,
free( lines[i] );
free( lines );
return TRUE;
return true;
error:
if (verbose)
@@ -626,7 +626,7 @@ error:
else
png_destroy_read_struct( &png_ptr, (png_infopp) NULL, (png_infopp) NULL );
}
return FALSE;
return false;
}
// ----------------------------------------------------------------------------
@@ -645,7 +645,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos
{
if (verbose)
wxLogError(_("Couldn't save PNG image."));
return FALSE;
return false;
}
png_set_error_fn(png_ptr, (png_voidp)NULL, wx_png_error, wx_png_warning);
@@ -656,7 +656,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos
png_destroy_write_struct( &png_ptr, (png_infopp)NULL );
if (verbose)
wxLogError(_("Couldn't save PNG image."));
return FALSE;
return false;
}
if (setjmp(wxinfo.jmpbuf))
@@ -664,7 +664,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos
png_destroy_write_struct( &png_ptr, (png_infopp)NULL );
if (verbose)
wxLogError(_("Couldn't save PNG image."));
return FALSE;
return false;
}
// NB: please see the comment near wxPNGInfoStruct declaration for
@@ -689,7 +689,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos
if (!data)
{
png_destroy_write_struct( &png_ptr, (png_infopp)NULL );
return FALSE;
return false;
}
for (int y = 0; y < image->GetHeight(); y++)
@@ -724,7 +724,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos
png_write_end( png_ptr, info_ptr );
png_destroy_write_struct( &png_ptr, (png_infopp)&info_ptr );
return TRUE;
return true;
}
#ifdef __VISUALC__

View File

@@ -70,15 +70,15 @@ bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
{
case wxT('2'):
if (verbose) wxLogError(_("Loading Grey Ascii PNM image is not yet implemented."));
return FALSE;
return false;
case wxT('5'):
if (verbose) wxLogError(_("Loading Grey Raw PNM image is not yet implemented."));
return FALSE;
return false;
case wxT('3'):
case wxT('6'): break;
default:
if (verbose) wxLogError(_("PNM: File format is not recognized."));
return FALSE;
return false;
}
text_stream.ReadLine(); // for the \n
@@ -94,7 +94,7 @@ bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
{
if (verbose)
wxLogError( _("PNM: Couldn't allocate memory.") );
return FALSE;
return false;
}
if (c=='3') // Ascii RBG
@@ -110,14 +110,14 @@ bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
if ( !buf_stream )
{
if (verbose) wxLogError(_("PNM: File seems truncated."));
return FALSE;
return false;
}
}
}
if (c=='6') // Raw RGB
buf_stream.Read( ptr, 3*width*height );
image->SetMask( FALSE );
image->SetMask( false );
const wxStreamError err = buf_stream.GetLastError();
return err == wxSTREAM_NO_ERROR || err == wxSTREAM_EOF;
@@ -146,11 +146,11 @@ bool wxPNMHandler::DoCanRead( wxInputStream& stream )
{
case '3':
case '6':
return TRUE;
return true;
}
}
return FALSE;
return false;
}

View File

@@ -202,7 +202,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
if (verbose)
wxLogError( _("TIFF: Error loading image.") );
return FALSE;
return false;
}
if (!TIFFSetDirectory( tif, (tdir_t)index ))
@@ -212,7 +212,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
TIFFClose( tif );
return FALSE;
return false;
}
uint32 w, h;
@@ -233,7 +233,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
TIFFClose( tif );
return FALSE;
return false;
}
image->Create( (int)w, (int)h );
@@ -245,7 +245,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
_TIFFfree( raster );
TIFFClose( tif );
return FALSE;
return false;
}
if (!TIFFReadRGBAImage( tif, w, h, raster, 0 ))
@@ -257,10 +257,10 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
image->Destroy();
TIFFClose( tif );
return FALSE;
return false;
}
bool hasmask = FALSE;
bool hasmask = false;
unsigned char *ptr = image->GetData();
ptr += w*3*(h-1);
@@ -273,7 +273,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
unsigned char alpha = (unsigned char)TIFFGetA(raster[pos]);
if (alpha < 127)
{
hasmask = TRUE;
hasmask = true;
ptr[0] = image->GetMaskRed();
ptr++;
ptr[0] = image->GetMaskGreen();
@@ -301,7 +301,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
image->SetMask( hasmask );
return TRUE;
return true;
}
int wxTIFFHandler::GetImageCount( wxInputStream& stream )
@@ -330,7 +330,7 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
if (verbose)
wxLogError( _("TIFF: Error saving image.") );
return FALSE;
return false;
}
TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32)image->GetWidth());
@@ -355,7 +355,7 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
TIFFClose( tif );
return FALSE;
return false;
}
}
else
@@ -381,7 +381,7 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
if (buf)
_TIFFfree(buf);
return FALSE;
return false;
}
ptr += image->GetWidth()*3;
}
@@ -391,7 +391,7 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
if (buf)
_TIFFfree(buf);
return TRUE;
return true;
}
bool wxTIFFHandler::DoCanRead( wxInputStream& stream )
@@ -399,7 +399,7 @@ bool wxTIFFHandler::DoCanRead( wxInputStream& stream )
unsigned char hdr[2];
if ( !stream.Read(&hdr, WXSIZEOF(hdr)) )
return FALSE;
return false;
return (hdr[0] == 'I' && hdr[1] == 'I') ||
(hdr[0] == 'M' && hdr[1] == 'M');

View File

@@ -102,9 +102,9 @@ bool wxXPMHandler::LoadFile(wxImage *image,
wxImage img = decoder.ReadFile(stream);
if ( !img.Ok() )
return FALSE;
return false;
*image = img;
return TRUE;
return true;
}
@@ -240,7 +240,7 @@ bool wxXPMHandler::SaveFile(wxImage * image,
delete[] symbols;
delete[] symbols_data;
return TRUE;
return true;
}
bool wxXPMHandler::DoCanRead(wxInputStream& stream)

View File

@@ -1078,7 +1078,7 @@ bool wxMsgCatalogFile::Load(const wxChar *szDirPrefix, const wxChar *szName0,
FIXME: UNICODE SUPPORT: must use CHARSET specifier!
*/
wxString szName = szName0;
if(szName.Find(wxT('.')) != -1) // contains a dot
if(szName.Find(wxT('.')) != wxNOT_FOUND) // contains a dot
szName = szName.Left(szName.Find(wxT('.')));
wxString searchPath = GetFullSearchPath(szDirPrefix);
@@ -1108,7 +1108,7 @@ bool wxMsgCatalogFile::Load(const wxChar *szDirPrefix, const wxChar *szName0,
wxString strFullName;
if ( !wxFindFileInPath(&strFullName, searchPath, strFile) ) {
wxLogVerbose(_("catalog file for domain '%s' not found."), szName.c_str());
return FALSE;
return false;
}
// open file
@@ -1117,18 +1117,18 @@ bool wxMsgCatalogFile::Load(const wxChar *szDirPrefix, const wxChar *szName0,
wxFile fileMsg(strFullName);
if ( !fileMsg.IsOpened() )
return FALSE;
return false;
// get the file size
off_t nSize = fileMsg.Length();
if ( nSize == wxInvalidOffset )
return FALSE;
return false;
// read the whole file in memory
m_pData = new size_t8[nSize];
if ( fileMsg.Read(m_pData, nSize) != nSize ) {
wxDELETEA(m_pData);
return FALSE;
return false;
}
// examine header
@@ -1148,7 +1148,7 @@ bool wxMsgCatalogFile::Load(const wxChar *szDirPrefix, const wxChar *szName0,
wxLogWarning(_("'%s' is not a valid message catalog."), strFullName.c_str());
wxDELETEA(m_pData);
return FALSE;
return false;
}
// initialize
@@ -1222,7 +1222,7 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash,
{
#if wxUSE_WCHAR_T
wxCSConv *csConv = NULL;
if ( !!m_charset )
if ( !m_charset.IsEmpty() )
csConv = new wxCSConv(m_charset);
wxMBConv& inputConv = csConv ? *((wxMBConv*)csConv) : *wxConvCurrent;
@@ -1239,10 +1239,10 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash,
if ( convertEncoding )
{
wxFontEncoding targetEnc = wxFONTENCODING_SYSTEM;
wxFontEncoding enc = wxFontMapper::Get()->CharsetToEncoding(m_charset, FALSE);
wxFontEncoding enc = wxFontMapper::Get()->CharsetToEncoding(m_charset, false);
if ( enc == wxFONTENCODING_SYSTEM )
{
convertEncoding = FALSE; // unknown encoding
convertEncoding = false; // unknown encoding
}
else
{
@@ -1252,10 +1252,10 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash,
wxFontEncodingArray a = wxEncodingConverter::GetPlatformEquivalents(enc);
if (a[0] == enc)
// no conversion needed, locale uses native encoding
convertEncoding = FALSE;
convertEncoding = false;
if (a.GetCount() == 0)
// we don't know common equiv. under this platform
convertEncoding = FALSE;
convertEncoding = false;
targetEnc = a[0];
}
}
@@ -1338,10 +1338,10 @@ bool wxMsgCatalog::Load(const wxChar *szDirPrefix, const wxChar *szName,
if ( file.Load(szDirPrefix, szName, m_pluralFormsCalculator) )
{
file.FillHash(m_messages, msgIdCharset, bConvertEncoding);
return TRUE;
return true;
}
return FALSE;
return false;
}
const wxChar *wxMsgCatalog::GetString(const wxChar *sz, size_t n) const
@@ -1425,7 +1425,7 @@ bool wxLocale::Init(const wxChar *szName,
// the argument to setlocale()
szLocale = szShort;
wxCHECK_MSG( szLocale, FALSE, _T("no locale to set in wxLocale::Init()") );
wxCHECK_MSG( szLocale, false, _T("no locale to set in wxLocale::Init()") );
}
#ifdef __WXWINCE__
@@ -1471,7 +1471,7 @@ bool wxLocale::Init(const wxChar *szName,
// load the default catalog with wxWidgets standard messages
m_pMsgCat = NULL;
bool bOk = TRUE;
bool bOk = true;
if ( bLoadDefault )
bOk = AddCatalog(wxT("wxstd"));
@@ -1523,7 +1523,7 @@ bool wxLocale::Init(int language, int flags)
// We failed to detect system language, so we will use English:
if (lang == wxLANGUAGE_UNKNOWN)
{
return FALSE;
return false;
}
const wxLanguageInfo *info = GetLanguageInfo(lang);
@@ -1532,7 +1532,7 @@ bool wxLocale::Init(int language, int flags)
if (info == NULL)
{
wxLogError(wxT("Unknown language %i."), lang);
return FALSE;
return false;
}
wxString name = info->Description;
@@ -1580,7 +1580,7 @@ bool wxLocale::Init(int language, int flags)
if ( !retloc )
{
wxLogError(wxT("Cannot set locale to '%s'."), locale.c_str());
return FALSE;
return false;
}
#elif defined(__WIN32__)
@@ -1637,7 +1637,7 @@ bool wxLocale::Init(int language, int flags)
{
wxLogLastError(wxT("SetThreadLocale"));
wxLogError(wxT("Cannot set locale to language %s."), name.c_str());
return FALSE;
return false;
}
else
{
@@ -1679,12 +1679,12 @@ bool wxLocale::Init(int language, int flags)
if ( !retloc )
{
wxLogError(wxT("Cannot set locale to language %s."), name.c_str());
return FALSE;
return false;
}
#elif defined(__WXMAC__) || defined(__WXPM__)
wxMB2WXbuf retloc = wxSetlocale(LC_ALL , wxEmptyString);
#else
return FALSE;
return false;
#define WX_NO_LOCALE_SUPPORT
#endif
@@ -2297,7 +2297,7 @@ wxFontEncoding wxLocale::GetSystemEncoding()
if ( !encname.empty() )
{
wxFontEncoding enc = wxFontMapper::Get()->
CharsetToEncoding(encname, FALSE /* not interactive */);
CharsetToEncoding(encname, false /* not interactive */);
// on some modern Linux systems (RedHat 8) the default system locale
// is UTF8 -- but it isn't supported by wxGTK in ANSI build at all so
@@ -2736,7 +2736,7 @@ class wxLocaleModule: public wxModule
DECLARE_DYNAMIC_CLASS(wxLocaleModule)
public:
wxLocaleModule() {}
bool OnInit() { return TRUE; }
bool OnInit() { return true; }
void OnExit() { wxLocale::DestroyLanguagesDB(); }
};

View File

@@ -31,23 +31,23 @@ IMPLEMENT_CLASS(wxClientBase, wxObject)
IMPLEMENT_CLASS(wxConnectionBase, wxObject)
wxConnectionBase::wxConnectionBase(wxChar *buffer, int size)
: m_connected(TRUE),
: m_connected(true),
m_buffer(buffer),
m_buffersize(size),
m_deletebufferwhendone(FALSE)
m_deletebufferwhendone(false)
{
if ( buffer == (wxChar *)NULL )
{ // behave like next constructor
m_buffersize = 0;
m_deletebufferwhendone = TRUE;
m_deletebufferwhendone = true;
}
}
wxConnectionBase::wxConnectionBase()
: m_connected(TRUE),
: m_connected(true),
m_buffer(NULL),
m_buffersize(0),
m_deletebufferwhendone(TRUE)
m_deletebufferwhendone(true)
{
}
@@ -55,7 +55,7 @@ wxConnectionBase::wxConnectionBase(wxConnectionBase& copy)
: m_connected(copy.m_connected),
m_buffer(copy.m_buffer),
m_buffersize(copy.m_buffersize),
m_deletebufferwhendone(FALSE)
m_deletebufferwhendone(false)
{
// copy constructor would require ref-counted pointer to buffer