Replaced char* arguments for raw data with void*

This commit is contained in:
Laurent Gomila committed 2012-04-03 19:11:19 +02:00
1 parent 9554c00851
commit ad035ec09d
8 files changed
+12 -12

No files matched your search

+1 -1
View File
@@ -92,7 +92,7 @@ CSFML_NETWORK_API void sfPacket_clear(sfPacket* packet);
/// \return Pointer to the data /// \return Pointer to the data
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_NETWORK_API const char* sfPacket_getData(const sfPacket* packet); CSFML_NETWORK_API const void* sfPacket_getData(const sfPacket* packet);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the size of the data contained in a packet /// \brief Get the size of the data contained in a packet
+2 -2
View File
@@ -159,7 +159,7 @@ CSFML_NETWORK_API void sfTcpSocket_disconnect(sfTcpSocket* socket);
/// \return Status code /// \return Status code
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_send(sfTcpSocket* socket, const char* data, size_t size); CSFML_NETWORK_API sfSocketStatus sfTcpSocket_send(sfTcpSocket* socket, const void* data, size_t size);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Receive raw data from the remote peer of a TCP socket /// \brief Receive raw data from the remote peer of a TCP socket
@@ -176,7 +176,7 @@ CSFML_NETWORK_API sfSocketStatus sfTcpSocket_send(sfTcpSocket* socket, const cha
/// \return Status code /// \return Status code
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_receive(sfTcpSocket* socket, char* data, size_t maxSize, size_t* sizeReceived); CSFML_NETWORK_API sfSocketStatus sfTcpSocket_receive(sfTcpSocket* socket, void* data, size_t maxSize, size_t* sizeReceived);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Send a formatted packet of data to the remote peer of a TCP socket /// \brief Send a formatted packet of data to the remote peer of a TCP socket
+2 -2
View File
@@ -137,7 +137,7 @@ CSFML_NETWORK_API void sfUdpSocket_Unbind(sfUdpSocket* socket);
/// \return Status code /// \return Status code
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_send(sfUdpSocket* socket, const char* data, size_t size, sfIpAddress address, unsigned short port); CSFML_NETWORK_API sfSocketStatus sfUdpSocket_send(sfUdpSocket* socket, const void* data, size_t size, sfIpAddress address, unsigned short port);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Receive raw data from a remote peer with a UDP socket /// \brief Receive raw data from a remote peer with a UDP socket
@@ -159,7 +159,7 @@ CSFML_NETWORK_API sfSocketStatus sfUdpSocket_send(sfUdpSocket* socket, const cha
/// \return Status code /// \return Status code
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_receive(sfUdpSocket* socket, char* data, size_t maxSize, size_t* sizeReceived, sfIpAddress* address, unsigned short* port); CSFML_NETWORK_API sfSocketStatus sfUdpSocket_receive(sfUdpSocket* socket, void* data, size_t maxSize, size_t* sizeReceived, sfIpAddress* address, unsigned short* port);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Send a formatted packet of data to a remote peer with a UDP socket /// \brief Send a formatted packet of data to a remote peer with a UDP socket
+1 -1
View File
@@ -31,7 +31,7 @@
#include <SFML/System/Export.h> #include <SFML/System/Export.h>
typedef sfInt64 (*sfInputStreamReadFunc)(char* data, sfInt64 size, void* userData); typedef sfInt64 (*sfInputStreamReadFunc)(void* data, sfInt64 size, void* userData);
typedef sfInt64 (*sfInputStreamSeekFunc)(sfInt64 position, void* userData); typedef sfInt64 (*sfInputStreamSeekFunc)(sfInt64 position, void* userData);
typedef sfInt64 (*sfInputStreamTellFunc)(void* userData); typedef sfInt64 (*sfInputStreamTellFunc)(void* userData);
typedef sfInt64 (*sfInputStreamGetSizeFunc)(void* userData); typedef sfInt64 (*sfInputStreamGetSizeFunc)(void* userData);
+1 -1
View File
@@ -68,7 +68,7 @@ public:
/// \return The number of bytes actually read /// \return The number of bytes actually read
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual sf::Int64 read(char* data, sf::Int64 size) virtual sf::Int64 read(void* data, sf::Int64 size)
{ {
return myStream.read ? myStream.read(data, size, myStream.userData) : -1; return myStream.read ? myStream.read(data, size, myStream.userData) : -1;
} }
+1 -1
View File
@@ -68,7 +68,7 @@ void sfPacket_clear(sfPacket* packet)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
const char* sfPacket_getData(const sfPacket* packet) const void* sfPacket_getData(const sfPacket* packet)
{ {
CSFML_CALL_RETURN(packet, getData(), NULL); CSFML_CALL_RETURN(packet, getData(), NULL);
} }
+2 -2
View File
@@ -107,7 +107,7 @@ void sfTcpSocket_disconnect(sfTcpSocket* socket)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfSocketStatus sfTcpSocket_send(sfTcpSocket* socket, const char* data, size_t size) sfSocketStatus sfTcpSocket_send(sfTcpSocket* socket, const void* data, size_t size)
{ {
CSFML_CHECK_RETURN(socket, sfSocketError); CSFML_CHECK_RETURN(socket, sfSocketError);
@@ -116,7 +116,7 @@ sfSocketStatus sfTcpSocket_send(sfTcpSocket* socket, const char* data, size_t si
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfSocketStatus sfTcpSocket_receive(sfTcpSocket* socket, char* data, size_t maxSize, size_t* sizeReceived) sfSocketStatus sfTcpSocket_receive(sfTcpSocket* socket, void* data, size_t maxSize, size_t* sizeReceived)
{ {
CSFML_CHECK_RETURN(socket, sfSocketError); CSFML_CHECK_RETURN(socket, sfSocketError);
+2 -2
View File
@@ -84,7 +84,7 @@ void sfUdpSocket_unbind(sfUdpSocket* socket)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfSocketStatus sfUdpSocket_send(sfUdpSocket* socket, const char* data, size_t size, sfIpAddress address, unsigned short port) sfSocketStatus sfUdpSocket_send(sfUdpSocket* socket, const void* data, size_t size, sfIpAddress address, unsigned short port)
{ {
CSFML_CHECK_RETURN(socket, sfSocketError); CSFML_CHECK_RETURN(socket, sfSocketError);
@@ -96,7 +96,7 @@ sfSocketStatus sfUdpSocket_send(sfUdpSocket* socket, const char* data, size_t si
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfSocketStatus sfUdpSocket_receive(sfUdpSocket* socket, char* data, size_t maxSize, size_t* sizeReceived, sfIpAddress* address, unsigned short* port) sfSocketStatus sfUdpSocket_receive(sfUdpSocket* socket, void* data, size_t maxSize, size_t* sizeReceived, sfIpAddress* address, unsigned short* port)
{ {
CSFML_CHECK_RETURN(socket, sfSocketError); CSFML_CHECK_RETURN(socket, sfSocketError);