Replace boost::filesystem with std (#6432)

This commit is contained in:
Dennis Luxen
2024-06-20 21:44:28 +02:00
committed by GitHub
parent c3f2a6cdb9
commit f1eabc3ecc
64 changed files with 417 additions and 311 deletions
+3 -2
View File
@@ -2,10 +2,11 @@
#include "util/log.hpp"
#include <boost/assert.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/numeric/conversion/cast.hpp>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <limits>
#include <string>
+4 -4
View File
@@ -7,17 +7,17 @@
#include <rapidjson/error/en.h>
#include <rapidjson/istreamwrapper.h>
#include <boost/filesystem.hpp>
#include <boost/geometry/algorithms/equals.hpp>
#include <boost/iterator/function_output_iterator.hpp>
#include <filesystem>
#include <fstream>
#include <string>
namespace osrm::extractor
{
LocationDependentData::LocationDependentData(const std::vector<boost::filesystem::path> &file_paths)
LocationDependentData::LocationDependentData(const std::vector<std::filesystem::path> &file_paths)
{
std::vector<rtree_t::value_type> bounding_boxes;
for (const auto &path : file_paths)
@@ -32,12 +32,12 @@ LocationDependentData::LocationDependentData(const std::vector<boost::filesystem
}
void LocationDependentData::loadLocationDependentData(
const boost::filesystem::path &file_path, std::vector<rtree_t::value_type> &bounding_boxes)
const std::filesystem::path &file_path, std::vector<rtree_t::value_type> &bounding_boxes)
{
if (file_path.empty())
return;
if (!boost::filesystem::exists(file_path) || !boost::filesystem::is_regular_file(file_path))
if (!std::filesystem::exists(file_path) || !std::filesystem::is_regular_file(file_path))
{
throw osrm::util::exception(std::string("File with location-dependent data ") +
file_path.string() + " does not exists");
+2 -2
View File
@@ -103,8 +103,8 @@ int RasterContainer::LoadRasterSource(const std::string &path_string,
util::Log() << "[source loader] Loading from " << path_string << " ... ";
TIMER_START(loading_source);
boost::filesystem::path filepath(path_string);
if (!boost::filesystem::exists(filepath))
std::filesystem::path filepath(path_string);
if (!std::filesystem::exists(filepath))
{
throw util::RuntimeError(
path_string, ErrorCode::FileOpenError, SOURCE_REF, "File not found");
+1 -1
View File
@@ -113,7 +113,7 @@ void handle_lua_error(const sol::protected_function_result &luares)
Sol2ScriptingEnvironment::Sol2ScriptingEnvironment(
const std::string &file_name,
const std::vector<boost::filesystem::path> &location_dependent_data_paths)
const std::vector<std::filesystem::path> &location_dependent_data_paths)
: file_name(file_name), location_dependent_data(location_dependent_data_paths)
{
util::Log() << "Using script " << file_name;