Changed the parameter of LoadFromMemory functions to be a const void* instead of a const char*

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1409 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-02-17 14:43:09 +00:00
parent b60fda48d9
commit 47d019098c
24 changed files with 38 additions and 38 deletions

View file

@ -232,18 +232,18 @@ Socket::Status SocketTCP::Accept(SocketTCP& connected, IPAddress* address)
////////////////////////////////////////////////////////////
/// Send an array of bytes to the host (must be connected first)
////////////////////////////////////////////////////////////
Socket::Status SocketTCP::Send(const char* data, std::size_t size)
Socket::Status SocketTCP::Send(const char* data, std::size_t sizeInBytes)
{
// First check that socket is valid
if (!IsValid())
return Socket::Error;
// Check parameters
if (data && size)
if (data && sizeInBytes)
{
// Loop until every byte has been sent
int sent = 0;
int sizeToSend = static_cast<int>(size);
int sizeToSend = static_cast<int>(sizeInBytes);
for (int length = 0; length < sizeToSend; length += sent)
{
// Send a chunk of data

View file

@ -115,14 +115,14 @@ bool SocketUDP::Unbind()
////////////////////////////////////////////////////////////
/// Send an array of bytes
////////////////////////////////////////////////////////////
Socket::Status SocketUDP::Send(const char* data, std::size_t size, const IPAddress& address, unsigned short port)
Socket::Status SocketUDP::Send(const char* data, std::size_t sizeInBytes, const IPAddress& address, unsigned short port)
{
// Make sure the socket is valid
if (!IsValid())
Create();
// Check parameters
if (data && size)
if (data && sizeInBytes)
{
// Build the target address
sockaddr_in sockAddr;
@ -133,7 +133,7 @@ Socket::Status SocketUDP::Send(const char* data, std::size_t size, const IPAddre
// Loop until every byte has been sent
int sent = 0;
int sizeToSend = static_cast<int>(size);
int sizeToSend = static_cast<int>(sizeInBytes);
for (int length = 0; length < sizeToSend; length += sent)
{
// Send a chunk of data