From 8f722ad0fc1004764772d9f8883beada5e25d2fb Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Thu, 24 May 2012 07:55:30 +0200 Subject: [PATCH] Fixed enum declaration errors (C++ style) in sfHttp and sfFtp --- include/SFML/Network/Ftp.h | 8 ++++---- include/SFML/Network/Http.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/SFML/Network/Ftp.h b/include/SFML/Network/Ftp.h index 22ddf1d..ef1905c 100644 --- a/include/SFML/Network/Ftp.h +++ b/include/SFML/Network/Ftp.h @@ -38,19 +38,19 @@ /// \brief Enumeration of transfer modes /// //////////////////////////////////////////////////////////// -enum sfFtpTransferMode +typedef enum { sfFtpBinary, ///< Binary mode (file is transfered as a sequence of bytes) sfFtpAscii, ///< Text mode using ASCII encoding sfFtpEbcdic ///< Text mode using EBCDIC encoding -}; +} sfFtpTransferMode; //////////////////////////////////////////////////////////// /// \brief Status codes possibly returned by a FTP response /// //////////////////////////////////////////////////////////// -enum sfFtpStatus +typedef enum { // 1xx: the requested action is being initiated, // expect another reply before proceeding with a new command @@ -110,7 +110,7 @@ enum sfFtpStatus sfFtpConnectionFailed = 1001, ///< Connection with server failed sfFtpConnectionClosed = 1002, ///< Connection with server closed sfFtpInvalidFile = 1003 ///< Invalid file to upload / download -}; +} sfFtpStatus; //////////////////////////////////////////////////////////// diff --git a/include/SFML/Network/Http.h b/include/SFML/Network/Http.h index e80301e..1ba7c4a 100644 --- a/include/SFML/Network/Http.h +++ b/include/SFML/Network/Http.h @@ -37,19 +37,19 @@ /// \brief Enumerate the available HTTP methods for a request /// //////////////////////////////////////////////////////////// -enum sfHttpMethod +typedef enum { sfHttpGet, ///< Request in get mode, standard method to retrieve a page sfHttpPost, ///< Request in post mode, usually to send data to a page sfHttpHead ///< Request a page's header only -}; +} sfHttpMethod; //////////////////////////////////////////////////////////// /// \brief Enumerate all the valid status codes for a response /// //////////////////////////////////////////////////////////// -enum sfHttpStatus +typedef enum { // 2xx: success sfHttpOk = 200, ///< Most common code returned when operation was successful @@ -78,7 +78,7 @@ enum sfHttpStatus // 10xx: SFML custom codes sfHttpInvalidResponse = 1000, ///< Response is not a valid HTTP one sfHttpConnectionFailed = 1001 ///< Connection with server failed -}; +} sfHttpStatus; ////////////////////////////////////////////////////////////