[STYLE] remove (void) in () to be c++ coherent

This commit is contained in:
Edouard DUPIN 2014-05-15 21:37:39 +02:00
parent 488658aecf
commit 22baa22bc2
10 changed files with 36 additions and 36 deletions

View File

@ -12,8 +12,8 @@
namespace enet {
class Ftp {
public:
Ftp(void) { };
virtual ~Ftp(void) { };
Ftp() { };
virtual ~Ftp() { };
};
};

View File

@ -16,22 +16,22 @@
#endif
#define __class__ ("Http")
static std::map<int32_t, std::string> getErrorList(void) {
static std::map<int32_t, std::string> getErrorList() {
static std::map<int32_t, std::string> g_list;
return g_list;
}
enet::Http::Http(void) :
enet::Http::Http() :
m_keepAlive(false) {
m_connection.setPort(80);
m_connection.setServer(false);
}
enet::Http::~Http(void) {
enet::Http::~Http() {
reset();
}
bool enet::Http::connect(void) {
bool enet::Http::connect() {
if (m_connection.getConnectionStatus() == enet::Tcp::statusLink) {
return true;
}
@ -61,7 +61,7 @@ std::string enet::Http::getReceiveHeaderProperties(const std::string& _key) {
return "";
}
bool enet::Http::reset(void) {
bool enet::Http::reset() {
if (m_connection.getConnectionStatus() != enet::Tcp::statusLink) {
m_connection.unlink();
}
@ -95,7 +95,7 @@ bool enet::Http::setPort(uint16_t _port) {
return true;
}
bool enet::Http::receiveData(void) {
bool enet::Http::receiveData() {
std::string header;
// Get data
char data[1025];
@ -298,7 +298,7 @@ bool enet::Http::post(const std::string& _address, const std::string& _contentTy
}
std::string enet::Http::dataString(void) {
std::string enet::Http::dataString() {
std::string data;
for (auto element : m_receiveData) {
if (element == '\0') {

View File

@ -17,8 +17,8 @@
namespace enet {
class Http {
public:
Http(void);
virtual ~Http(void);
Http();
virtual ~Http();
private:
enet::Tcp m_connection;
private:
@ -27,7 +27,7 @@ namespace enet {
void setKeepAlive(bool _keepAlive) {
m_keepAlive = true;
}
bool getKeepAlive(void) {
bool getKeepAlive() {
return m_keepAlive;
}
private:
@ -35,8 +35,8 @@ namespace enet {
std::map<std::string, std::string> m_sendHeader;
std::map<std::string, std::string> m_receiveHeader;
std::vector<uint8_t> m_receiveData;
bool connect(void);
bool reset(void);
bool connect();
bool reset();
public:
void setSendHeaderProperties(const std::string& _key, const std::string& _val);
std::string getSendHeaderProperties(const std::string& _key);
@ -47,16 +47,16 @@ namespace enet {
bool post(const std::string& _address, const std::map<std::string, std::string>& _values);
bool post(const std::string& _address, const std::string& _contentType, const std::string& _data);
int32_t dataSize(void) {
int32_t dataSize() {
return m_receiveData.size();
}
const std::vector<uint8_t>& data(void) {
const std::vector<uint8_t>& data() {
return m_receiveData;
}
std::string dataString(void);
std::string dataString();
std::string escapeChar(const std::string& _value);
std::string unEscapeChar(const std::string& _value);
bool receiveData(void);
bool receiveData();
};
};

View File

@ -20,7 +20,7 @@
#endif
#define __class__ ("Tcp")
enet::Tcp::Tcp(void) :
enet::Tcp::Tcp() :
m_socketId(-1),
m_socketIdClient(-1),
m_host("127.0.0.1"),
@ -30,7 +30,7 @@ enet::Tcp::Tcp(void) :
}
enet::Tcp::~Tcp(void) {
enet::Tcp::~Tcp() {
unlink();
}
@ -79,7 +79,7 @@ void enet::Tcp::setServer(bool _status) {
m_server = _status;
}
bool enet::Tcp::link(void) {
bool enet::Tcp::link() {
if (m_status == statusLink) {
ENET_ERROR("Connection is already started");
return false;
@ -177,7 +177,7 @@ bool enet::Tcp::link(void) {
}
bool enet::Tcp::unlink(void) {
bool enet::Tcp::unlink() {
if (m_socketIdClient >= 0) {
ENET_INFO(" close client socket");
close(m_socketIdClient);

View File

@ -15,8 +15,8 @@ namespace enet {
int32_t m_socketId; //!< socket linux interface generic
int32_t m_socketIdClient;
public:
Tcp(void);
virtual ~Tcp(void);
Tcp();
virtual ~Tcp();
private:
std::string m_host; //!< hostname/IP to connect with.
public:
@ -37,7 +37,7 @@ namespace enet {
* @brief Get the decriptive name hot the host
* @return the string requested
*/
const std::string& getHostName(void) {
const std::string& getHostName() {
return m_host;
}
private:
@ -52,7 +52,7 @@ namespace enet {
* @brief Get the port number.
* @return The requested port number.
*/
uint16_t getPort(void) {
uint16_t getPort() {
return m_port;
}
private:
@ -67,7 +67,7 @@ namespace enet {
* @brief Get the server mode status.
* @return true: the tcp interface is configure as a server.
*/
int32_t getServer(void) {
int32_t getServer() {
return m_server;
}
public:
@ -83,7 +83,7 @@ namespace enet {
* @brief Get the current Status of the connection
* @return The status.
*/
enum status getConnectionStatus(void) {
enum status getConnectionStatus() {
return m_status;
}
public:
@ -92,13 +92,13 @@ namespace enet {
* @return true if connection is done
* @return false otherwise ...
*/
bool link(void);
bool link();
/**
* @brief Unlink on a specific interface.
* @return true if connection is removed
* @return false otherwise ...
*/
bool unlink(void);
bool unlink();
/**
* @brief Read a chunk of data on the socket
* @param[in] _data pointer on the data might be write

View File

@ -12,8 +12,8 @@
namespace enet {
class Udp {
public:
Udp(void) { };
virtual ~Udp(void) { };
Udp() { };
virtual ~Udp() { };
};
};

View File

@ -8,7 +8,7 @@
#include <enet/debug.h>
int32_t enet::getLogId(void) {
int32_t enet::getLogId() {
static int32_t g_val = etk::log::registerInstance("enet");
return g_val;
}

View File

@ -12,7 +12,7 @@
#include <etk/log.h>
namespace enet {
int32_t getLogId(void);
int32_t getLogId();
};
// TODO : Review this problem of multiple intanciation of "std::stringbuf sb"

View File

@ -8,7 +8,7 @@
#include <test/debug.h>
int32_t appl::getLogId(void) {
int32_t appl::getLogId() {
static int32_t g_val = etk::log::registerInstance("enettest");
return g_val;
}

View File

@ -12,7 +12,7 @@
#include <etk/log.h>
namespace appl {
int32_t getLogId(void);
int32_t getLogId();
};
// TODO : Review this problem of multiple intanciation of "std::stringbuf sb"