Replace boost::filesystem with std (#6432)
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user