Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/geom-output.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ namespace geom {

template <typename CHAR, typename TRAITS>
std::basic_ostream<CHAR, TRAITS> &
operator<<(std::basic_ostream<CHAR, TRAITS> &out, const nullgeom_t & /*input*/)
operator<<(std::basic_ostream<CHAR, TRAITS> &out, nullgeom_t const & /*input*/)
{
return out << "NULL";
}

template <typename CHAR, typename TRAITS>
std::basic_ostream<CHAR, TRAITS> &
operator<<(std::basic_ostream<CHAR, TRAITS> &out, const point_t &input)
operator<<(std::basic_ostream<CHAR, TRAITS> &out, point_t const &input)
{
return out << input.x() << ' ' << input.y();
}

template <typename CHAR, typename TRAITS>
std::basic_ostream<CHAR, TRAITS> &
operator<<(std::basic_ostream<CHAR, TRAITS> &out, const point_list_t &input)
operator<<(std::basic_ostream<CHAR, TRAITS> &out, point_list_t const &input)
{
if (input.empty()) {
return out << "EMPTY";
Expand All @@ -56,7 +56,7 @@ operator<<(std::basic_ostream<CHAR, TRAITS> &out, const point_list_t &input)

template <typename CHAR, typename TRAITS>
std::basic_ostream<CHAR, TRAITS> &
operator<<(std::basic_ostream<CHAR, TRAITS> &out, const polygon_t &input)
operator<<(std::basic_ostream<CHAR, TRAITS> &out, polygon_t const &input)
{
out << '(' << input.outer() << ')';
for (auto const &ring : input.inners()) {
Expand All @@ -67,7 +67,7 @@ operator<<(std::basic_ostream<CHAR, TRAITS> &out, const polygon_t &input)

template <typename CHAR, typename TRAITS>
std::basic_ostream<CHAR, TRAITS> &
operator<<(std::basic_ostream<CHAR, TRAITS> &out, const collection_t &input)
operator<<(std::basic_ostream<CHAR, TRAITS> &out, collection_t const &input)
{
if (input.num_geometries() == 0) {
return out << "EMPTY";
Expand All @@ -83,7 +83,7 @@ operator<<(std::basic_ostream<CHAR, TRAITS> &out, const collection_t &input)
template <typename CHAR, typename TRAITS, typename GEOM>
std::basic_ostream<CHAR, TRAITS> &
operator<<(std::basic_ostream<CHAR, TRAITS> &out,
const multigeometry_t<GEOM> &input)
multigeometry_t<GEOM> const &input)
{
if (input.num_geometries() == 0) {
return out << "EMPTY";
Expand All @@ -98,7 +98,7 @@ operator<<(std::basic_ostream<CHAR, TRAITS> &out,

template <typename CHAR, typename TRAITS>
std::basic_ostream<CHAR, TRAITS> &
operator<<(std::basic_ostream<CHAR, TRAITS> &out, const geometry_t &geom)
operator<<(std::basic_ostream<CHAR, TRAITS> &out, geometry_t const &geom)
{
out << geometry_type(geom) << '(';
geom.visit([&](auto const &input) { out << input; });
Expand Down
2 changes: 1 addition & 1 deletion src/output-flex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class prepared_lua_function_t
* \param nresults The number of results this function is supposed to have.
*/
prepared_lua_function_t(lua_State *lua_state, calling_context context,
const char *name, int nresults = 0);
char const *name, int nresults = 0);

/// Return the index of the function on the Lua stack.
int index() const noexcept { return m_index; }
Expand Down
2 changes: 1 addition & 1 deletion src/output.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class output_t
return m_output_requirements;
}

const options_t *get_options() const noexcept { return m_options; };
options_t const *get_options() const noexcept { return m_options; };

private:
std::shared_ptr<middle_query_t> m_mid;
Expand Down
2 changes: 1 addition & 1 deletion src/tagtransform-c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static void add_z_order(taglist_t *tags, bool *roads)
*roads = false;

if (highway) {
for (const auto &layer : layers) {
for (auto const &layer : layers) {
if (*highway == layer.highway) {
z_order += layer.offset;
*roads = layer.roads;
Expand Down
2 changes: 1 addition & 1 deletion src/tile-output.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

template <typename TChar, typename TTraits>
std::basic_ostream<TChar, TTraits> &
operator<<(std::basic_ostream<TChar, TTraits> &out, const tile_t &tile)
operator<<(std::basic_ostream<TChar, TTraits> &out, tile_t const &tile)
{
return out << "TILE(" << tile.zoom() << ", " << tile.x() << ", " << tile.y()
<< ')';
Expand Down
2 changes: 1 addition & 1 deletion src/wkb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ std::string geom_to_ewkb(geom::geometry_t const &geom, bool ensure_multi)

geom::geometry_t ewkb_to_geom(std::string const &wkb)
{
const char *const end = wkb.data() + wkb.size();
char const *const end = wkb.data() + wkb.size();
ewkb::ewkb_parser_t parser{wkb.data(), end};
auto geom = parser();

Expand Down
4 changes: 2 additions & 2 deletions tests/common-import.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ class data_t
std::back_inserter(m_objects));
}

void add(std::initializer_list<const char *> const &objects)
void add(std::initializer_list<char const *> const &objects)
{
std::copy(std::begin(objects), std::end(objects),
std::back_inserter(m_objects));
}

const char *operator()()
char const *operator()()
{
std::sort(m_objects.begin(), m_objects.end(),
[](std::string const &a, std::string const &b) {
Expand Down