Skip to content

Commit 8de2822

Browse files
authored
Merge pull request #1852 from joto/cleanup-pgsql-out
Small cleanup in pgsql output code
2 parents 4483c79 + e60911b commit 8de2822

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/output-pgsql.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ output_pgsql_t::output_pgsql_t(std::shared_ptr<middle_query_t> const &mid,
439439
auto copy_thread = std::make_shared<db_copy_thread_t>(options.conninfo);
440440

441441
//for each table
442-
for (size_t i = 0; i < t_MAX; ++i) {
442+
for (std::size_t i = 0; i < m_tables.size(); ++i) {
443443

444444
//figure out the columns this table needs
445445
columns_t columns = exlist.normal_columns(
@@ -488,10 +488,10 @@ output_pgsql_t::output_pgsql_t(
488488
m_buffer(1024, osmium::memory::Buffer::auto_grow::yes),
489489
m_rels_buffer(1024, osmium::memory::Buffer::auto_grow::yes)
490490
{
491-
for (size_t i = 0; i < t_MAX; ++i) {
491+
for (std::size_t i = 0; i < m_tables.size(); ++i) {
492492
//copy constructor will just connect to the already there table
493493
m_tables[i] =
494-
std::make_unique<table_t>(*(other->m_tables[i].get()), copy_thread);
494+
std::make_unique<table_t>(*(other->m_tables[i]), copy_thread);
495495
}
496496
}
497497

0 commit comments

Comments
 (0)