diff --git a/include/SFML/Config.hpp b/include/SFML/Config.hpp index 7a1d0bfc7..fee139b82 100644 --- a/include/SFML/Config.hpp +++ b/include/SFML/Config.hpp @@ -168,7 +168,6 @@ namespace sf { // 8 bits integer types -using Int8 = std::int8_t; using Uint8 = std::uint8_t; // 16 bits integer types diff --git a/include/SFML/Network/Packet.hpp b/include/SFML/Network/Packet.hpp index 1226f2481..ba23b99d6 100644 --- a/include/SFML/Network/Packet.hpp +++ b/include/SFML/Network/Packet.hpp @@ -213,7 +213,7 @@ public: //////////////////////////////////////////////////////////// /// \overload //////////////////////////////////////////////////////////// - Packet& operator>>(Int8& data); + Packet& operator>>(std::int8_t& data); //////////////////////////////////////////////////////////// /// \overload @@ -294,7 +294,7 @@ public: //////////////////////////////////////////////////////////// /// \overload //////////////////////////////////////////////////////////// - Packet& operator<<(Int8 data); + Packet& operator<<(std::int8_t data); //////////////////////////////////////////////////////////// /// \overload @@ -498,7 +498,7 @@ private: /// Packets have built-in operator >> and << overloads for /// standard types: /// \li bool -/// \li fixed-size integer types (sf::Int8/16/32, sf::Uint8/16/32) +/// \li fixed-size integer types (int[8|16|32]_t, uint[8|16|32]_t) /// \li floating point numbers (float, double) /// \li string types (char*, wchar_t*, std::string, std::wstring, sf::String) /// @@ -510,7 +510,7 @@ private: /// struct MyStruct /// { /// float number; -/// sf::Int8 integer; +/// std::int8_t integer; /// std::string str; /// }; /// diff --git a/src/SFML/Network/Packet.cpp b/src/SFML/Network/Packet.cpp index ce3dbe6f3..372eb6e35 100644 --- a/src/SFML/Network/Packet.cpp +++ b/src/SFML/Network/Packet.cpp @@ -129,7 +129,7 @@ Packet& Packet::operator>>(bool& data) //////////////////////////////////////////////////////////// -Packet& Packet::operator>>(Int8& data) +Packet& Packet::operator>>(std::int8_t& data) { if (checkSize(sizeof(data))) { @@ -400,7 +400,7 @@ Packet& Packet::operator<<(bool data) //////////////////////////////////////////////////////////// -Packet& Packet::operator<<(Int8 data) +Packet& Packet::operator<<(std::int8_t data) { append(&data, sizeof(data)); return *this; diff --git a/test/Network/Packet.cpp b/test/Network/Packet.cpp index 8315c1522..e8b431201 100644 --- a/test/Network/Packet.cpp +++ b/test/Network/Packet.cpp @@ -18,12 +18,12 @@ TEST_CASE("sf::Packet class - [network]") { SUBCASE("Stream operators") { - SUBCASE("Int8") + SUBCASE("std::int8_t") { - testPacketStreamOperators(sf::Int8(0)); - testPacketStreamOperators(sf::Int8(1)); - testPacketStreamOperators(std::numeric_limits::min()); - testPacketStreamOperators(std::numeric_limits::max()); + testPacketStreamOperators(std::int8_t(0)); + testPacketStreamOperators(std::int8_t(1)); + testPacketStreamOperators(std::numeric_limits::min()); + testPacketStreamOperators(std::numeric_limits::max()); } SUBCASE("Int16") diff --git a/test/System/Config.cpp b/test/System/Config.cpp index 0499dd758..482d5b929 100644 --- a/test/System/Config.cpp +++ b/test/System/Config.cpp @@ -14,7 +14,6 @@ TEST_CASE("SFML/Config.hpp") SUBCASE("Fixed width types") { - CHECK(sizeof(sf::Int8) == 1); CHECK(sizeof(sf::Uint8) == 1); CHECK(sizeof(sf::Int16) == 2);