Skip to content

Commit a0ae47c

Browse files
authored
Merge pull request #1841 from joto/east-const
Use east const
2 parents 11cc485 + 0d9f29c commit a0ae47c

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

src/geom-output.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ namespace geom {
2727

2828
template <typename CHAR, typename TRAITS>
2929
std::basic_ostream<CHAR, TRAITS> &
30-
operator<<(std::basic_ostream<CHAR, TRAITS> &out, const nullgeom_t & /*input*/)
30+
operator<<(std::basic_ostream<CHAR, TRAITS> &out, nullgeom_t const & /*input*/)
3131
{
3232
return out << "NULL";
3333
}
3434

3535
template <typename CHAR, typename TRAITS>
3636
std::basic_ostream<CHAR, TRAITS> &
37-
operator<<(std::basic_ostream<CHAR, TRAITS> &out, const point_t &input)
37+
operator<<(std::basic_ostream<CHAR, TRAITS> &out, point_t const &input)
3838
{
3939
return out << input.x() << ' ' << input.y();
4040
}
4141

4242
template <typename CHAR, typename TRAITS>
4343
std::basic_ostream<CHAR, TRAITS> &
44-
operator<<(std::basic_ostream<CHAR, TRAITS> &out, const point_list_t &input)
44+
operator<<(std::basic_ostream<CHAR, TRAITS> &out, point_list_t const &input)
4545
{
4646
if (input.empty()) {
4747
return out << "EMPTY";
@@ -56,7 +56,7 @@ operator<<(std::basic_ostream<CHAR, TRAITS> &out, const point_list_t &input)
5656

5757
template <typename CHAR, typename TRAITS>
5858
std::basic_ostream<CHAR, TRAITS> &
59-
operator<<(std::basic_ostream<CHAR, TRAITS> &out, const polygon_t &input)
59+
operator<<(std::basic_ostream<CHAR, TRAITS> &out, polygon_t const &input)
6060
{
6161
out << '(' << input.outer() << ')';
6262
for (auto const &ring : input.inners()) {
@@ -67,7 +67,7 @@ operator<<(std::basic_ostream<CHAR, TRAITS> &out, const polygon_t &input)
6767

6868
template <typename CHAR, typename TRAITS>
6969
std::basic_ostream<CHAR, TRAITS> &
70-
operator<<(std::basic_ostream<CHAR, TRAITS> &out, const collection_t &input)
70+
operator<<(std::basic_ostream<CHAR, TRAITS> &out, collection_t const &input)
7171
{
7272
if (input.num_geometries() == 0) {
7373
return out << "EMPTY";
@@ -83,7 +83,7 @@ operator<<(std::basic_ostream<CHAR, TRAITS> &out, const collection_t &input)
8383
template <typename CHAR, typename TRAITS, typename GEOM>
8484
std::basic_ostream<CHAR, TRAITS> &
8585
operator<<(std::basic_ostream<CHAR, TRAITS> &out,
86-
const multigeometry_t<GEOM> &input)
86+
multigeometry_t<GEOM> const &input)
8787
{
8888
if (input.num_geometries() == 0) {
8989
return out << "EMPTY";
@@ -98,7 +98,7 @@ operator<<(std::basic_ostream<CHAR, TRAITS> &out,
9898

9999
template <typename CHAR, typename TRAITS>
100100
std::basic_ostream<CHAR, TRAITS> &
101-
operator<<(std::basic_ostream<CHAR, TRAITS> &out, const geometry_t &geom)
101+
operator<<(std::basic_ostream<CHAR, TRAITS> &out, geometry_t const &geom)
102102
{
103103
out << geometry_type(geom) << '(';
104104
geom.visit([&](auto const &input) { out << input; });

src/output-flex.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class prepared_lua_function_t
7272
* \param nresults The number of results this function is supposed to have.
7373
*/
7474
prepared_lua_function_t(lua_State *lua_state, calling_context context,
75-
const char *name, int nresults = 0);
75+
char const *name, int nresults = 0);
7676

7777
/// Return the index of the function on the Lua stack.
7878
int index() const noexcept { return m_index; }

src/output.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class output_t
129129
return m_output_requirements;
130130
}
131131

132-
const options_t *get_options() const noexcept { return m_options; };
132+
options_t const *get_options() const noexcept { return m_options; };
133133

134134
private:
135135
std::shared_ptr<middle_query_t> m_mid;

src/tagtransform-c.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static void add_z_order(taglist_t *tags, bool *roads)
5858
*roads = false;
5959

6060
if (highway) {
61-
for (const auto &layer : layers) {
61+
for (auto const &layer : layers) {
6262
if (*highway == layer.highway) {
6363
z_order += layer.offset;
6464
*roads = layer.roads;

src/tile-output.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
template <typename TChar, typename TTraits>
1818
std::basic_ostream<TChar, TTraits> &
19-
operator<<(std::basic_ostream<TChar, TTraits> &out, const tile_t &tile)
19+
operator<<(std::basic_ostream<TChar, TTraits> &out, tile_t const &tile)
2020
{
2121
return out << "TILE(" << tile.zoom() << ", " << tile.x() << ", " << tile.y()
2222
<< ')';

src/wkb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ std::string geom_to_ewkb(geom::geometry_t const &geom, bool ensure_multi)
566566

567567
geom::geometry_t ewkb_to_geom(std::string const &wkb)
568568
{
569-
const char *const end = wkb.data() + wkb.size();
569+
char const *const end = wkb.data() + wkb.size();
570570
ewkb::ewkb_parser_t parser{wkb.data(), end};
571571
auto geom = parser();
572572

tests/common-import.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ class data_t
8585
std::back_inserter(m_objects));
8686
}
8787

88-
void add(std::initializer_list<const char *> const &objects)
88+
void add(std::initializer_list<char const *> const &objects)
8989
{
9090
std::copy(std::begin(objects), std::end(objects),
9191
std::back_inserter(m_objects));
9292
}
9393

94-
const char *operator()()
94+
char const *operator()()
9595
{
9696
std::sort(m_objects.begin(), m_objects.end(),
9797
[](std::string const &a, std::string const &b) {

0 commit comments

Comments
 (0)