Opened 20 years ago

Last modified 20 years ago

#1469 closed Patch

Fix VS.NET 2003 compilation warnings (cvs)

Reported by: elsapo Owned by:
Priority: normal Component: Other
Keywords: Cc: elsapo, Tim Kosse
Component version: Operating system type:
Operating system version:

Description

cvs version, fix two Fix VS.NET 2003 compilation warnings

#1)

FtpControlSocket.cpp, line 4658

...\FileZilla\source\FtpControlSocket.cpp(4657):
warning C4800: 'const BOOL' : forcing value to bool
'true' or 'false' (performance warning)

SetDirectoryListing(&dir, WorkingDir.path ==

dir.path);

change to

SetDirectoryListing(&dir, WorkingDir.path ==

dir.path);

#2)

Similarly line 4693

...\FileZilla\source\FtpControlSocket.cpp(4693) :
warning C4800: 'const BOOL' : forcing value to bool
'true' or 'false' (performance warning)

SetDirectoryListing(&dir, WorkingDir.path ==

dir.path);

change to

SetDirectoryListing(&dir, !!(WorkingDir.path ==

dir.path));

Change History (2)

comment:1 by Tim Kosse, 20 years ago

I really wonder why BOOL is not just a define for bool.

I could not reproduce these warnings, nontheless I've just
changed the == and != operator of CServerPath to return
bool instead of BOOL.

comment:2 by elsapo, 20 years ago

I really wonder why BOOL is not just a define for bool.

Microsoft introduced the BOOL typedef as a typedef for int,
before the "bool" was added to either C++ or C, I think, and
then never changed it -- probably now they're the prisoners
of history (compatibility) :)

Note: See TracTickets for help on using tickets.