Use bool instead of int. Replace TRUE/FALSE with true/false.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2004-08-08 05:30:36 +00:00
parent 3e1400ac6a
commit 948c96efa1
9 changed files with 102 additions and 124 deletions

View File

@@ -42,13 +42,13 @@ public:
GAddress *GetPeer();
GSocketError SetServer();
GSocket *WaitConnection();
int SetReusable() { return 0; }
bool SetReusable() { return false; }
GSocketError SetNonOriented();
GSocketError Connect(GSocketStream stream);
int Read(char *buffer, int size);
int Write(const char *buffer, int size);
GSocketEventFlags Select(GSocketEventFlags flags);
void SetNonBlocking(int non_block);
void SetNonBlocking(bool non_block);
void SetTimeout(unsigned long millisec);
GSocketError WXDLLIMPEXP_NET GetError();
void SetCallback(GSocketEventFlags flags,
@@ -83,17 +83,17 @@ public:
GAddress *m_peer;
GSocketError m_error;
int m_non_blocking;
int m_server;
int m_stream;
int m_oriented;
bool m_non_blocking;
bool m_server;
bool m_stream;
bool m_oriented;
unsigned long m_timeout;
/* Callbacks */
GSocketEventFlags m_detected;
GSocketCallback m_cbacks[GSOCK_MAX_EVENT];
char *m_data[GSOCK_MAX_EVENT];
int m_takesEvents ;
bool m_takesEvents ;
};

View File

@@ -23,14 +23,6 @@
#include "wx/msw/wrapwin.h"
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
class GSocketGUIFunctionsTableConcrete: public GSocketGUIFunctionsTable
{
public:
@@ -58,7 +50,7 @@ public:
GAddress *GetPeer();
GSocketError SetServer();
GSocket *WaitConnection();
int SetReusable();
bool SetReusable();
GSocketError Connect(GSocketStream stream);
GSocketError SetNonOriented();
int Read(char *buffer, int size);
@@ -92,11 +84,11 @@ public:
GSocketError m_error;
/* Attributes */
int m_non_blocking;
int m_server;
int m_stream;
int m_establishing;
int m_reusable;
bool m_non_blocking;
bool m_server;
bool m_stream;
bool m_establishing;
bool m_reusable;
struct timeval m_timeout;
/* Callbacks */

View File

@@ -21,14 +21,6 @@
#include "gsocket.h"
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
class GSocketGUIFunctionsTableConcrete: public GSocketGUIFunctionsTable
{
public:
@@ -57,13 +49,13 @@ public:
GAddress *GetPeer();
GSocketError SetServer();
GSocket *WaitConnection();
int SetReusable();
bool SetReusable();
GSocketError Connect(GSocketStream stream);
GSocketError SetNonOriented();
int Read(char *buffer, int size);
int Write(const char *buffer, int size);
GSocketEventFlags Select(GSocketEventFlags flags);
void SetNonBlocking(int non_block);
void SetNonBlocking(bool non_block);
void SetTimeout(unsigned long millisec);
GSocketError WXDLLIMPEXP_NET GetError();
void SetCallback(GSocketEventFlags flags,
@@ -95,11 +87,11 @@ public:
GAddress *m_peer;
GSocketError m_error;
int m_non_blocking;
int m_server;
int m_stream;
int m_establishing;
int m_reusable;
bool m_non_blocking;
bool m_server;
bool m_stream;
bool m_establishing;
bool m_reusable;
unsigned long m_timeout;
/* Callbacks */