Skip to content

Commit

Permalink
Remove pre-C++17 Filesystem library support
Browse files Browse the repository at this point in the history
  • Loading branch information
Miralqir committed Aug 9, 2024
1 parent 2a0e423 commit 2e353fd
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 35 deletions.
6 changes: 0 additions & 6 deletions deps/watchdog/Watchdog.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,8 @@

#include <functional>

// fucking filesystem
#if _MSC_VER >= 1925
#include <filesystem>
namespace ci { namespace fs = std::filesystem; }
#else
#include <experimental/filesystem>
namespace ci { namespace fs = std::experimental::filesystem; }
#endif

//! Exception for when Watchdog can't locate a file or parse the wildcard
class WatchedFileSystemExc : public std::exception {
Expand Down
6 changes: 0 additions & 6 deletions src/api/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,8 @@
#include <Util/CrashHandler.h>


// fucking filesystem
#if _MSC_VER >= 1925
#include <filesystem>
namespace fs = std::filesystem;
#else
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#endif


Sapphire::Common::Util::CrashHandler crashHandler;
Expand Down
7 changes: 1 addition & 6 deletions src/common/Config/ConfigMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
#include <iostream>
#include <fstream>

#if _MSC_VER >= 1925
#include <filesystem>
namespace fs = std::filesystem;
#else
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#endif

using namespace Sapphire;
using namespace Sapphire::Common;
Expand Down Expand Up @@ -94,4 +89,4 @@ bool ConfigMgr::copyDefaultConfig( const std::string& configName )
fs::copy_file( configPath.string() + m_configDefaultSuffix, configPath );

return true;
}
}
5 changes: 0 additions & 5 deletions src/common/Logging/Logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@
#include <spdlog/sinks/daily_file_sink.h>

// #include <iostream>
#if _MSC_VER >= 1925
#include <filesystem>
namespace fs = std::filesystem;
#else
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#endif


void Sapphire::Logger::init( const std::string& logPath )
Expand Down
6 changes: 0 additions & 6 deletions src/dbm/DbManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,8 @@
using namespace Sapphire;
using namespace Sapphire::Common;

// fucking filesystem
#if _MSC_VER >= 1925
#include <filesystem>
namespace fs = std::filesystem;
#else
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#endif


DbManager::DbManager( const std::string& host, const std::string& database, const std::string& user, const std::string& pw, uint16_t port ) :
Expand Down
6 changes: 0 additions & 6 deletions src/dbm/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@

Sapphire::Common::Util::CrashHandler crashHandler;

// fucking filesystem
#if _MSC_VER >= 1925
#include <filesystem>
namespace filesys = std::filesystem;
#else
#include <experimental/filesystem>
namespace filesys = std::experimental::filesystem;
#endif

#include <fstream>
#include <streambuf>
Expand Down

0 comments on commit 2e353fd

Please sign in to comment.