Remove GCC 8 workarounds

This commit is contained in:
Chris Thrasher 2022-01-20 23:41:18 -07:00 committed by Vittorio Romeo
parent 2df0bfa1b5
commit ec4ac1afc4
3 changed files with 1 additions and 14 deletions

View File

@ -16,8 +16,6 @@ TEST_CASE("sf::FileInputStream class - [system]")
CHECK(fis.tell() == -1); CHECK(fis.tell() == -1);
} }
// Work around GCC 8.x bug with `<filesystem>`.
#if !defined(__GNUC__) || (__GNUC__ >= 9)
SUBCASE("Temporary file stream") SUBCASE("Temporary file stream")
{ {
const std::string fileContents = "hello world"; const std::string fileContents = "hello world";
@ -40,5 +38,4 @@ TEST_CASE("sf::FileInputStream class - [system]")
CHECK(std::string_view(buffer, 6) == std::string_view(fileContents.c_str() + 5, 6)); CHECK(std::string_view(buffer, 6) == std::string_view(fileContents.c_str() + 5, 6));
} }
} }
#endif // !defined(__GNUC__) || (__GNUC__ >= 9)
} }

View File

@ -4,12 +4,8 @@
#include <SFML/System/String.hpp> #include <SFML/System/String.hpp>
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
// Work around GCC 8.x bug with `<filesystem>`.
#if !defined(__GNUC__) || (__GNUC__ >= 9)
#include <filesystem>
#endif // !defined(__GNUC__) || (__GNUC__ >= 9)
#include <cassert> #include <cassert>
#include <filesystem>
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include <limits> #include <limits>
@ -38,8 +34,6 @@ namespace sf
} }
} }
// Work around GCC 8.x bug with `<filesystem>`.
#if !defined(__GNUC__) || (__GNUC__ >= 9)
namespace sf::Testing namespace sf::Testing
{ {
static std::string getTemporaryFilePath() static std::string getTemporaryFilePath()
@ -78,4 +72,3 @@ namespace sf::Testing
return m_path; return m_path;
} }
} }
#endif // !defined(__GNUC__) || (__GNUC__ >= 9)

View File

@ -39,8 +39,6 @@ namespace sf
} }
} }
// Work around GCC 8.x bug with `<filesystem>`.
#if !defined(__GNUC__) || (__GNUC__ >= 9)
namespace sf::Testing namespace sf::Testing
{ {
class TemporaryFile class TemporaryFile
@ -63,6 +61,5 @@ namespace sf::Testing
const std::string& getPath() const; const std::string& getPath() const;
}; };
} }
#endif // !defined(__GNUC__) || (__GNUC__ >= 9)
#endif // SFML_TESTUTILITIES_SYSTEM_HPP #endif // SFML_TESTUTILITIES_SYSTEM_HPP