Fixes various compiler diagnostics
Found with LLVM 3.9.1 and then fixed the most severe categories.
This commit is contained in:
committed by
Daniel J. H
parent
b5d5f309a3
commit
1153b78c06
@@ -68,7 +68,7 @@ struct TileParameters final
|
||||
const auto valid_z = z < 20 && z >= 12;
|
||||
|
||||
return valid_x && valid_y && valid_z;
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ class MapMatching final : public BasicRoutingInterface<DataFacadeT, MapMatching<
|
||||
auto trace_distance = 0.0;
|
||||
matching.nodes.reserve(reconstructed_indices.size());
|
||||
matching.indices.reserve(reconstructed_indices.size());
|
||||
for (const auto idx : reconstructed_indices)
|
||||
for (const auto &idx : reconstructed_indices)
|
||||
{
|
||||
const auto timestamp_index = idx.first;
|
||||
const auto location_index = idx.second;
|
||||
|
||||
@@ -145,7 +145,7 @@ class FileReader
|
||||
result.push_back(thisline);
|
||||
}
|
||||
}
|
||||
catch (const std::ios_base::failure &e)
|
||||
catch (const std::ios_base::failure &)
|
||||
{
|
||||
// EOF is OK here, everything else, re-throw
|
||||
if (!input_stream.eof())
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
// Helper macros, don't use these ones
|
||||
// STRIP the OSRM_PROJECT_DIR from the front of a filename. Expected to come
|
||||
// from CMake's CURRENT_SOURCE_DIR, which doesn't have a trailing /, hence the +1
|
||||
#define _PROJECT_RELATIVE_PATH(x) std::string(x).substr(strlen(OSRM_PROJECT_DIR) + 1)
|
||||
#define PROJECT_RELATIVE_PATH_(x) std::string(x).substr(strlen(OSRM_PROJECT_DIR) + 1)
|
||||
// Return the path of a file, relative to the OSRM_PROJECT_DIR
|
||||
#define _OSRM_SOURCE_FILE _PROJECT_RELATIVE_PATH(__FILE__)
|
||||
#define OSRM_SOURCE_FILE_ PROJECT_RELATIVE_PATH_(__FILE__)
|
||||
|
||||
// This is the macro to use
|
||||
#define SOURCE_REF std::string(" (at ") + _OSRM_SOURCE_FILE + ":" + std::to_string(__LINE__) + ")"
|
||||
#define SOURCE_REF std::string(" (at ") + OSRM_SOURCE_FILE_ + ":" + std::to_string(__LINE__) + ")"
|
||||
|
||||
#endif // SOURCE_MACROS_HPP
|
||||
#endif // SOURCE_MACROS_HPP
|
||||
|
||||
@@ -47,7 +47,7 @@ class GeojsonLogger
|
||||
// cannot lock, is tooling for locked function
|
||||
static void output(bool first, const util::json::Array &array)
|
||||
{
|
||||
for (const auto object : array.values)
|
||||
for (const auto &object : array.values)
|
||||
{
|
||||
if (!first)
|
||||
ofs << ",\n\t\t";
|
||||
|
||||
Reference in New Issue
Block a user