Merge branch 'master' of https://github.com/Project-OSRM/osrm-backend into upgrade_libsol2_v2.20.6

This commit is contained in:
Desone Burns II
2020-11-18 17:11:02 -07:00
13 changed files with 153 additions and 62 deletions
@@ -127,7 +127,9 @@ inline std::string canonicalizeStringList(std::string strlist, const std::string
// collapse spaces; this is needed in case we expand "; X" => "; X" above
// but also makes sense to do irregardless of the fact - canonicalizing strings.
const auto spaces = [](auto lhs, auto rhs) { return ::isspace(lhs) && ::isspace(rhs); };
const auto spaces = [](unsigned char lhs, unsigned char rhs) {
return ::isspace(lhs) && ::isspace(rhs);
};
auto it = std::unique(begin(strlist), end(strlist), spaces);
strlist.erase(it, end(strlist));
+4 -3
View File
@@ -47,7 +47,7 @@ class RasterGrid
{
xdim = _xdim;
ydim = _ydim;
_data.reserve(ydim * xdim);
_data.resize(ydim * xdim);
BOOST_ASSERT(ydim * xdim <= _data.capacity());
// Construct FileReader
@@ -164,6 +164,7 @@ class RasterCache
// get reference of cache
std::vector<RasterSource> &getLoadedSources() { return LoadedSources; }
std::unordered_map<std::string, int> &getLoadedSourcePaths() { return LoadedSourcePaths; }
private:
// constructor
RasterCache() = default;
@@ -173,7 +174,7 @@ class RasterCache
// the instance
static RasterCache *g_instance;
};
}
}
} // namespace extractor
} // namespace osrm
#endif /* RASTER_SOURCE_HPP */