Skip to content

Commit fec8513

Browse files
committed
constexpr const is redundant
1 parent cec20ae commit fec8513

18 files changed

+25
-26
lines changed

src/gen/osm2pgsql-gen.cpp

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

7777
namespace {
7878

79-
constexpr std::size_t const MAX_FORCE_SINGLE_THREAD = 4;
79+
constexpr std::size_t MAX_FORCE_SINGLE_THREAD = 4;
8080

8181
struct tile_extent
8282
{

src/gen/tracer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class tracer_t
3939
std::size_t num_points() const noexcept { return m_num_points; }
4040

4141
private:
42-
static constexpr auto const BITS_PER_WORD = sizeof(potrace_word) * 8;
42+
static constexpr std::size_t BITS_PER_WORD = sizeof(potrace_word) * 8;
4343

4444
geom::point_t make_point(potrace_dpoint_t const &p) const noexcept;
4545

src/geom-functions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ void line_merge(geometry_t *output, geometry_t const &input)
607607
std::vector<endpoint_t> endpoints;
608608

609609
// ...and a list of connections.
610-
constexpr auto const NOCONN = std::numeric_limits<std::size_t>::max();
610+
constexpr std::size_t NOCONN = std::numeric_limits<std::size_t>::max();
611611

612612
struct connection_t
613613
{

src/geom-pole-of-inaccessibility.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ auto point_to_polygon_distance(point_t point, polygon_t const &polygon,
118118

119119
struct Cell
120120
{
121-
static constexpr double const SQRT2 = 1.4142135623730951;
121+
static constexpr double SQRT2 = 1.4142135623730951;
122122

123123
Cell(point_t c, double h, polygon_t const &polygon, double stretch)
124124
: center(c), half_size(h),

src/geom.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class multigeometry_t
200200
using iterator = typename std::vector<GEOM>::iterator;
201201
using value_type = GEOM;
202202

203-
static constexpr bool const FOR_POINT = std::is_same_v<GEOM, point_t>;
203+
static constexpr bool FOR_POINT = std::is_same_v<GEOM, point_t>;
204204

205205
[[nodiscard]] std::size_t num_geometries() const noexcept
206206
{

src/hex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ std::string encode_hex(std::string const &in)
3838

3939
namespace {
4040

41-
constexpr std::array<char, 256> const HEX_TABLE = {
41+
constexpr std::array<char, 256> HEX_TABLE = {
4242
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4343
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4444
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

src/node-locations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ osmium::Location node_locations_t::get(osmid_t id) const
8383

8484
void node_locations_t::log_stats()
8585
{
86-
constexpr auto const MBYTE = 1024 * 1024;
86+
constexpr auto MBYTE = 1024 * 1024;
8787
log_debug("Node locations cache:");
8888
log_debug(" num locations stored: {}", m_count);
8989
log_debug(" bytes overall: {}MB", used_memory() / MBYTE);

src/node-locations.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class node_locations_t
8585
* The block size used for internal blocks. The larger the block size
8686
* the less memory is consumed but the more expensive the access is.
8787
*/
88-
static constexpr const std::size_t BLOCK_SIZE = 32;
88+
static constexpr std::size_t BLOCK_SIZE = 32;
8989

9090
bool first_entry_in_block() const noexcept
9191
{

src/ordered-index.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class ordered_index_t
185185

186186
std::pair<osmid_t, std::size_t> get_internal(osmid_t id) const noexcept;
187187

188-
static constexpr std::size_t const MAX_BLOCK_SIZE = 16UL * 1024UL * 1024UL;
188+
static constexpr std::size_t MAX_BLOCK_SIZE = 16UL * 1024UL * 1024UL;
189189

190190
std::vector<range_entry> m_ranges;
191191
std::size_t m_block_size;

src/output-flex.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ void push_osm_object_to_lua_stack(lua_State *lua_state,
133133
* timestamp, changeset, uid, user). For ways there are 2 more (is_closed,
134134
* nodes), for relations 1 more (members).
135135
*/
136-
constexpr int const MAX_TABLE_SIZE = 10;
136+
constexpr int MAX_TABLE_SIZE = 10;
137137

138138
lua_createtable(lua_state, 0, MAX_TABLE_SIZE);
139139

@@ -243,7 +243,7 @@ typename CONTAINER::value_type &get_from_idx_param(lua_State *lua_state,
243243

244244
std::size_t get_nodes(middle_query_t const &middle, osmium::Way *way)
245245
{
246-
constexpr std::size_t const MAX_MISSING_NODES = 100;
246+
constexpr std::size_t MAX_MISSING_NODES = 100;
247247
static std::size_t count_missing_nodes = 0;
248248

249249
auto const count = middle.nodes_get_list(&way->nodes());

0 commit comments

Comments
 (0)