Skip to content

Commit f92d491

Browse files
authored
Merge pull request #2179 from joto/fix-num-array-members
Fix number of array members
2 parents 90dbf8d + 17d879a commit f92d491

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/command-line-parser.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
#endif
2828

2929
#include <algorithm>
30-
#include <array>
3130
#include <cstdio>
3231
#include <cstring>
3332
#include <stdexcept>
3433
#include <thread> // for number of threads
34+
#include <vector>
3535

3636
static osmium::Box parse_bbox_param(std::string const &arg)
3737
{
@@ -131,13 +131,10 @@ void print_version()
131131

132132
static void check_options_non_slim(CLI::App const &app)
133133
{
134-
std::array<std::string, 6> const slim_options = {
135-
"--flat-nodes",
136-
"--middle-schema",
137-
"--middle-with-nodes",
138-
"--middle-way-node-index-id-shift",
139-
"--tablespace-slim-data",
140-
"--tablespace-slim-index"};
134+
std::vector<std::string> const slim_options = {
135+
"--flat-nodes", "--middle-schema",
136+
"--middle-with-nodes", "--middle-way-node-index-id-shift",
137+
"--tablespace-slim-data", "--tablespace-slim-index"};
141138

142139
for (auto const &opt : slim_options) {
143140
if (app.count(opt) > 0) {

src/flex-table-column.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
#include "util.hpp"
1414

1515
#include <algorithm>
16-
#include <array>
1716
#include <cctype>
1817
#include <cstdlib>
1918
#include <stdexcept>
2019
#include <utility>
20+
#include <vector>
2121

2222
struct column_type_lookup
2323
{
@@ -27,7 +27,7 @@ struct column_type_lookup
2727
char const *name() const noexcept { return m_name; }
2828
};
2929

30-
static std::array<column_type_lookup, 26> const column_types = {
30+
static std::vector<column_type_lookup> const column_types = {
3131
{{"text", table_column_type::text},
3232
{"boolean", table_column_type::boolean},
3333
{"bool", table_column_type::boolean},

0 commit comments

Comments
 (0)