From c2761c317e0d7356963d4edb9bfefcc23843143c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Wed, 29 Oct 2014 09:38:56 +0100 Subject: [PATCH] Added static_cast for sf::Uint8 (fixes #731). --- src/SFML/Network/Packet.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/SFML/Network/Packet.cpp b/src/SFML/Network/Packet.cpp index 35328f74..31fe259f 100644 --- a/src/SFML/Network/Packet.cpp +++ b/src/SFML/Network/Packet.cpp @@ -438,14 +438,14 @@ Packet& Packet::operator <<(Int64 data) // to network byte order (big endian) manually Uint8 toWrite[] = { - (data >> 56) & 0xFF, - (data >> 48) & 0xFF, - (data >> 40) & 0xFF, - (data >> 32) & 0xFF, - (data >> 24) & 0xFF, - (data >> 16) & 0xFF, - (data >> 8) & 0xFF, - (data ) & 0xFF + static_cast((data >> 56) & 0xFF), + static_cast((data >> 48) & 0xFF), + static_cast((data >> 40) & 0xFF), + static_cast((data >> 32) & 0xFF), + static_cast((data >> 24) & 0xFF), + static_cast((data >> 16) & 0xFF), + static_cast((data >> 8) & 0xFF), + static_cast((data ) & 0xFF) }; append(&toWrite, sizeof(toWrite)); return *this; @@ -459,14 +459,14 @@ Packet& Packet::operator <<(Uint64 data) // to network byte order (big endian) manually Uint8 toWrite[] = { - (data >> 56) & 0xFF, - (data >> 48) & 0xFF, - (data >> 40) & 0xFF, - (data >> 32) & 0xFF, - (data >> 24) & 0xFF, - (data >> 16) & 0xFF, - (data >> 8) & 0xFF, - (data ) & 0xFF + static_cast((data >> 56) & 0xFF), + static_cast((data >> 48) & 0xFF), + static_cast((data >> 40) & 0xFF), + static_cast((data >> 32) & 0xFF), + static_cast((data >> 24) & 0xFF), + static_cast((data >> 16) & 0xFF), + static_cast((data >> 8) & 0xFF), + static_cast((data ) & 0xFF) }; append(&toWrite, sizeof(toWrite)); return *this;