Skip to content

Commit 9cc3a69

Browse files
committed
clang-tidy: Make const what can be const
1 parent 5fdf598 commit 9cc3a69

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/osm_gis_export_overview.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ int main(int argc, char* argv[]) {
183183
std::string input_filename;
184184
std::string output_filename;
185185
std::string output_format{"SQLite"};
186-
bool debug = false;
186+
const bool debug = false;
187187

188188
config cfg;
189189

@@ -237,7 +237,7 @@ int main(int argc, char* argv[]) {
237237
osmium::util::VerboseOutput vout{cfg.verbose};
238238
vout << "Writing to '" << output_filename << "'\n";
239239

240-
osmium::io::File input_file{input_filename};
240+
const osmium::io::File input_file{input_filename};
241241

242242
osmium::area::Assembler::config_type assembler_config;
243243
if (debug) {
@@ -286,7 +286,7 @@ int main(int argc, char* argv[]) {
286286
std::cerr << "\n";
287287
}
288288

289-
osmium::MemoryUsage memory;
289+
const osmium::MemoryUsage memory;
290290
if (memory.peak()) {
291291
vout << "Memory used: " << memory.peak() << " MBytes\n";
292292
}

src/osmium_toogr2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ int main(int argc, char* argv[]) {
166166
input_filename = "-";
167167
}
168168

169-
osmium::io::File input_file{input_filename};
169+
const osmium::io::File input_file{input_filename};
170170

171171
osmium::area::Assembler::config_type assembler_config;
172172
if (debug) {
@@ -216,7 +216,7 @@ int main(int argc, char* argv[]) {
216216
std::cerr << "\n";
217217
}
218218

219-
osmium::MemoryUsage memory;
219+
const osmium::MemoryUsage memory;
220220
if (memory.peak()) {
221221
std::cerr << "Memory used: " << memory.peak() << " MBytes\n";
222222
}

src/osmium_toogr2_exp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ int main(int argc, char* argv[]) {
181181

182182
exr.close();
183183

184-
std::vector<const osmium::Relation*> incomplete_relations = exr.collector().get_incomplete_relations();
184+
const std::vector<const osmium::Relation*> incomplete_relations = exr.collector().get_incomplete_relations();
185185
if (!incomplete_relations.empty()) {
186186
std::cerr << "Warning! Some member ways missing for these multipolygon relations:";
187187
for (const auto* relation : incomplete_relations) {

0 commit comments

Comments
 (0)