Replaced unsigned long with Uint32 in the public API (avoids size problems with bindings)

This commit is contained in:
Laurent Gomila 2011-11-20 13:50:11 +01:00
parent 017ef652f9
commit a5d40de8a2
16 changed files with 22 additions and 22 deletions

View file

@ -39,7 +39,7 @@ RenderWindow::RenderWindow()
////////////////////////////////////////////////////////////
RenderWindow::RenderWindow(VideoMode mode, const std::string& title, unsigned long style, const ContextSettings& settings)
RenderWindow::RenderWindow(VideoMode mode, const std::string& title, Uint32 style, const ContextSettings& settings)
{
// Don't call the base class constructor because it contains virtual function calls
Create(mode, title, style, settings);

View file

@ -85,7 +85,7 @@ void Text::SetCharacterSize(unsigned int size)
////////////////////////////////////////////////////////////
void Text::SetStyle(unsigned long style)
void Text::SetStyle(Uint32 style)
{
if (myStyle != style)
{
@ -117,7 +117,7 @@ unsigned int Text::GetCharacterSize() const
////////////////////////////////////////////////////////////
unsigned long Text::GetStyle() const
Uint32 Text::GetStyle() const
{
return myStyle;
}

View file

@ -277,7 +277,7 @@ Socket::Status TcpSocket::Send(Packet& packet)
const char* data = packet.OnSend(size);
// First send the packet size
Uint32 packetSize = htonl(static_cast<unsigned long>(size));
Uint32 packetSize = htonl(static_cast<Uint32>(size));
Status status = Send(reinterpret_cast<const char*>(&packetSize), sizeof(packetSize));
// Make sure that the size was properly sent

View file

@ -36,7 +36,7 @@ namespace sf
namespace priv
{
////////////////////////////////////////////////////////////
sockaddr_in SocketImpl::CreateAddress(unsigned long address, unsigned short port)
sockaddr_in SocketImpl::CreateAddress(Uint32 address, unsigned short port)
{
sockaddr_in addr;
std::memset(addr.sin_zero, 0, sizeof(addr.sin_zero));

View file

@ -34,7 +34,7 @@ namespace sf
namespace priv
{
////////////////////////////////////////////////////////////
sockaddr_in SocketImpl::CreateAddress(unsigned long address, unsigned short port)
sockaddr_in SocketImpl::CreateAddress(Uint32 address, unsigned short port)
{
sockaddr_in addr;
std::memset(addr.sin_zero, 0, sizeof(addr.sin_zero));
@ -63,7 +63,7 @@ void SocketImpl::Close(SocketHandle sock)
////////////////////////////////////////////////////////////
void SocketImpl::SetBlocking(SocketHandle sock, bool block)
{
unsigned long blocking = block ? 0 : 1;
u_long blocking = block ? 0 : 1;
ioctlsocket(sock, FIONBIO, &blocking);
}

View file

@ -59,7 +59,7 @@ public :
/// \return sockaddr_in ready to be used by socket functions
///
////////////////////////////////////////////////////////////
static sockaddr_in CreateAddress(unsigned long address, unsigned short port);
static sockaddr_in CreateAddress(Uint32 address, unsigned short port);
////////////////////////////////////////////////////////////
/// \brief Return the value of the invalid socket

View file

@ -37,7 +37,7 @@
namespace
{
// OpenGL resources counter and its mutex
unsigned long count = 0;
unsigned int count = 0;
sf::Mutex mutex;
}

View file

@ -87,7 +87,7 @@ myIsCursorIn (false)
////////////////////////////////////////////////////////////
WindowImplWin32::WindowImplWin32(VideoMode mode, const std::string& title, unsigned long style) :
WindowImplWin32::WindowImplWin32(VideoMode mode, const std::string& title, Uint32 style) :
myHandle (NULL),
myCallback (0),
myCursor (NULL),

View file

@ -62,7 +62,7 @@ public :
/// \param style Window style
///
////////////////////////////////////////////////////////////
WindowImplWin32(VideoMode mode, const std::string& title, unsigned long style);
WindowImplWin32(VideoMode mode, const std::string& title, Uint32 style);
////////////////////////////////////////////////////////////
/// \brief Destructor

View file

@ -55,7 +55,7 @@ myFramerateLimit(0)
////////////////////////////////////////////////////////////
Window::Window(VideoMode mode, const std::string& title, unsigned long style, const ContextSettings& settings) :
Window::Window(VideoMode mode, const std::string& title, Uint32 style, const ContextSettings& settings) :
myWindow (NULL),
myContext (NULL),
myLastFrameTime (0),
@ -84,7 +84,7 @@ Window::~Window()
////////////////////////////////////////////////////////////
void Window::Create(VideoMode mode, const std::string& title, unsigned long style, const ContextSettings& settings)
void Window::Create(VideoMode mode, const std::string& title, Uint32 style, const ContextSettings& settings)
{
// Destroy the previous window implementation
Close();

View file

@ -55,7 +55,7 @@ namespace sf
namespace priv
{
////////////////////////////////////////////////////////////
WindowImpl* WindowImpl::New(VideoMode mode, const std::string& title, unsigned long style)
WindowImpl* WindowImpl::New(VideoMode mode, const std::string& title, Uint32 style)
{
return new WindowImplType(mode, title, style);
}

View file

@ -64,7 +64,7 @@ public :
/// \return Pointer to the created window (don't forget to delete it)
///
////////////////////////////////////////////////////////////
static WindowImpl* New(VideoMode mode, const std::string& title, unsigned long style);
static WindowImpl* New(VideoMode mode, const std::string& title, Uint32 style);
////////////////////////////////////////////////////////////
/// \brief Create a new window depending on to the current OS