Skip to content

Commit cec20ae

Browse files
committed
Use east const consistently
1 parent c3cd871 commit cec20ae

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

src/geom-area-assembler.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace geom {
1515

16-
const osmium::area::AssemblerConfig area_config;
16+
osmium::area::AssemblerConfig const area_config;
1717

1818
area_assembler_t::area_assembler_t(osmium::memory::Buffer *buffer)
1919
: osmium::area::detail::BasicAssembler(area_config), m_buffer(buffer)
@@ -36,7 +36,7 @@ bool area_assembler_t::make_area()
3636
return true;
3737
}
3838

39-
bool area_assembler_t::operator()(const osmium::Way &way)
39+
bool area_assembler_t::operator()(osmium::Way const &way)
4040
{
4141
segment_list().extract_segments_from_way(nullptr, stats().duplicate_nodes,
4242
way);
@@ -46,10 +46,10 @@ bool area_assembler_t::operator()(const osmium::Way &way)
4646
// Currently the relation is not needed for assembling the area, because
4747
// the roles on the members are ignored. In the future we might want to use
4848
// the roles, so we leave the function signature as it is.
49-
bool area_assembler_t::operator()(const osmium::Relation & /*relation*/,
50-
const osmium::memory::Buffer &ways_buffer)
49+
bool area_assembler_t::operator()(osmium::Relation const & /*relation*/,
50+
osmium::memory::Buffer const &ways_buffer)
5151
{
52-
for (const auto &way : ways_buffer.select<osmium::Way>()) {
52+
for (auto const &way : ways_buffer.select<osmium::Way>()) {
5353
segment_list().extract_segments_from_way(nullptr,
5454
stats().duplicate_nodes, way);
5555
}

src/geom-area-assembler.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class area_assembler_t : public osmium::area::detail::BasicAssembler
3535
* @returns false if there was some kind of error building the
3636
* area, true otherwise.
3737
*/
38-
bool operator()(const osmium::Way &way);
38+
bool operator()(osmium::Way const &way);
3939

4040
/**
4141
* Assemble an area from the given relation and its member ways
@@ -44,8 +44,8 @@ class area_assembler_t : public osmium::area::detail::BasicAssembler
4444
* @returns false if there was some kind of error building the
4545
* area, true otherwise.
4646
*/
47-
bool operator()(const osmium::Relation &relation,
48-
const osmium::memory::Buffer &ways_buffer);
47+
bool operator()(osmium::Relation const &relation,
48+
osmium::memory::Buffer const &ways_buffer);
4949

5050
/**
5151
* Access the area that was built last.

src/geom-pole-of-inaccessibility.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Cell make_centroid_cell(polygon_t const &polygon, double stretch)
147147

148148
} // anonymous namespace
149149

150-
point_t pole_of_inaccessibility(const polygon_t &polygon, double precision,
150+
point_t pole_of_inaccessibility(polygon_t const &polygon, double precision,
151151
double stretch)
152152
{
153153
assert(stretch > 0);

src/geom-pole-of-inaccessibility.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace geom {
2828
*
2929
* \pre \code stretch > 0 \endcode
3030
*/
31-
point_t pole_of_inaccessibility(const polygon_t &polygon, double precision,
31+
point_t pole_of_inaccessibility(polygon_t const &polygon, double precision,
3232
double stretch = 1.0);
3333

3434
void pole_of_inaccessibility(geometry_t *output, geometry_t const &input,

src/idlist.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ osmid_t idlist_t::pop_id()
2525
void idlist_t::sort_unique()
2626
{
2727
std::sort(m_list.begin(), m_list.end());
28-
const auto last = std::unique(m_list.begin(), m_list.end());
28+
auto const last = std::unique(m_list.begin(), m_list.end());
2929
m_list.erase(last, m_list.end());
3030
}
3131

src/middle-pgsql.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747

4848
namespace {
4949

50-
void send_id_list(pg_conn_t const &db_connection,
51-
std::string const &table, idlist_t const &ids)
50+
void send_id_list(pg_conn_t const &db_connection, std::string const &table,
51+
idlist_t const &ids)
5252
{
5353
std::string data;
5454
for (auto const id : ids) {
@@ -171,7 +171,7 @@ class member_list_json_builder
171171
}
172172

173173
static bool number_float(nlohmann::json::number_float_t /*val*/,
174-
const nlohmann::json::string_t & /*s*/)
174+
nlohmann::json::string_t const & /*s*/)
175175
{
176176
return true;
177177
}
@@ -228,8 +228,8 @@ class member_list_json_builder
228228
static bool end_array() { return true; }
229229

230230
static bool parse_error(std::size_t /*position*/,
231-
const std::string & /*last_token*/,
232-
const nlohmann::json::exception &ex)
231+
std::string const & /*last_token*/,
232+
nlohmann::json::exception const &ex)
233233
{
234234
throw ex;
235235
}

src/osm2pgsql.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ void check_and_update_flat_node_file(properties_t *properties,
188188
flat_node_file_from_import);
189189
}
190190
} else {
191-
const auto absolute_path =
191+
auto const absolute_path =
192192
std::filesystem::absolute(
193193
std::filesystem::path{options->flat_node_file})
194194
.string();
@@ -279,7 +279,7 @@ void check_and_update_style_file(properties_t *properties, options_t *options)
279279
throw std::runtime_error{"Style file from import is empty!?"};
280280
}
281281

282-
const auto absolute_path =
282+
auto const absolute_path =
283283
std::filesystem::absolute(std::filesystem::path{options->style})
284284
.string();
285285

0 commit comments

Comments
 (0)