Skip to content

Commit fc46609

Browse files
committed
Rename middle_pgsql_t::m_out_options to middle_pgsql_t::m_options
1 parent a65ab49 commit fc46609

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/middle-pgsql.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ void middle_pgsql_t::node_set(osmium::Node const &node)
309309
{
310310
m_cache->set(node.id(), node.location());
311311

312-
if (m_out_options->flat_node_cache_enabled) {
312+
if (m_options->flat_node_cache_enabled) {
313313
m_persistent_cache->set(node.id(), node.location());
314314
} else {
315315
m_db_copy.new_line(m_tables[NODE_TABLE].m_copy_target);
@@ -331,7 +331,7 @@ void middle_pgsql_t::node_delete(osmid_t osm_id)
331331
{
332332
assert(m_append);
333333

334-
if (m_out_options->flat_node_cache_enabled) {
334+
if (m_options->flat_node_cache_enabled) {
335335
m_persistent_cache->set(osm_id, osmium::Location{});
336336
} else {
337337
m_db_copy.new_line(m_tables[NODE_TABLE].m_copy_target);
@@ -378,7 +378,7 @@ void middle_pgsql_t::way_set(osmium::Way const &way)
378378
}
379379
m_db_copy.finish_array();
380380

381-
buffer_store_tags(way, m_out_options->extra_attributes);
381+
buffer_store_tags(way, m_options->extra_attributes);
382382

383383
m_db_copy.finish_line();
384384
}
@@ -503,7 +503,7 @@ void middle_pgsql_t::relation_set(osmium::Relation const &rel)
503503
}
504504

505505
// tags
506-
buffer_store_tags(rel, m_out_options->extra_attributes);
506+
buffer_store_tags(rel, m_options->extra_attributes);
507507

508508
m_db_copy.finish_line();
509509
}
@@ -600,22 +600,22 @@ void middle_pgsql_t::flush() { m_db_copy.sync(); }
600600
void middle_pgsql_t::stop(thread_pool_t &pool)
601601
{
602602
m_cache.reset();
603-
if (m_out_options->flat_node_cache_enabled) {
603+
if (m_options->flat_node_cache_enabled) {
604604
m_persistent_cache.reset();
605605
}
606606

607-
if (m_out_options->droptemp) {
607+
if (m_options->droptemp) {
608608
// Dropping the tables is fast, so do it synchronously to guarantee
609609
// that the space is freed before creating the other indices.
610610
for (auto &table : m_tables) {
611-
table.stop(m_out_options->database_options.conninfo(),
612-
m_out_options->droptemp, !m_append);
611+
table.stop(m_options->database_options.conninfo(),
612+
m_options->droptemp, !m_append);
613613
}
614614
} else {
615615
for (auto &table : m_tables) {
616616
pool.submit(std::bind(&middle_pgsql_t::table_desc::stop, &table,
617-
m_out_options->database_options.conninfo(),
618-
m_out_options->droptemp, !m_append));
617+
m_options->database_options.conninfo(),
618+
m_options->droptemp, !m_append));
619619
}
620620
}
621621
}
@@ -743,10 +743,10 @@ static bool check_bucket_index(pg_conn_t *db_connection,
743743
}
744744

745745
middle_pgsql_t::middle_pgsql_t(options_t const *options)
746-
: m_append(options->append), m_out_options(options),
746+
: m_append(options->append), m_options(options),
747747
m_cache(new node_ram_cache{options->alloc_chunkwise | ALLOC_LOSSY,
748748
options->cache}),
749-
m_db_connection(m_out_options->database_options.conninfo()),
749+
m_db_connection(m_options->database_options.conninfo()),
750750
m_copy_thread(
751751
std::make_shared<db_copy_thread_t>(options->database_options.conninfo())),
752752
m_db_copy(m_copy_thread)
@@ -779,7 +779,7 @@ middle_pgsql_t::get_query_instance()
779779
// NOTE: this is thread safe for use in pending async processing only because
780780
// during that process they are only read from
781781
std::unique_ptr<middle_query_pgsql_t> mid{
782-
new middle_query_pgsql_t{m_out_options->database_options.conninfo(),
782+
new middle_query_pgsql_t{m_options->database_options.conninfo(),
783783
m_cache, m_persistent_cache}};
784784

785785
// We use a connection per table to enable the use of COPY

src/middle-pgsql.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ struct middle_pgsql_t : public slim_middle_t
113113
table_desc m_tables[NUM_TABLES];
114114

115115
bool m_append;
116-
options_t const *m_out_options;
116+
options_t const *m_options;
117117

118118
std::shared_ptr<node_ram_cache> m_cache;
119119
std::shared_ptr<node_persistent_cache> m_persistent_cache;

0 commit comments

Comments
 (0)