Skip to content

Commit f5971f6

Browse files
committed
Small code cleanups in flex output
1 parent 33bfa3b commit f5971f6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/output-flex.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,10 +456,9 @@ flex_table_t &output_flex_t::create_flex_table()
456456
throw fmt_error("Table with name '{}' already exists.", table_name);
457457
}
458458

459-
m_tables->emplace_back(table_name);
460-
auto &new_table = m_tables->back();
459+
auto &new_table = m_tables->emplace_back(table_name);
461460

462-
lua_pop(lua_state(), 1);
461+
lua_pop(lua_state(), 1); // "name"
463462

464463
// optional "schema" field
465464
lua_getfield(lua_state(), -1, "schema");
@@ -1445,7 +1444,7 @@ output_flex_t::output_flex_t(std::shared_ptr<middle_query_t> const &mid,
14451444
log_debug("- TABLE {}", qualified_name(table.schema(), table.name()));
14461445
log_debug(" - columns:");
14471446
for (auto const &column : table) {
1448-
log_debug(" - \"{}\" {} ({}) not_null={} create_only={}",
1447+
log_debug(R"( - "{}" {} ({}) not_null={} create_only={})",
14491448
column.name(), column.type_name(), column.sql_type_name(),
14501449
column.not_null(), column.create_only());
14511450
}

src/output-flex.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ class output_flex_t : public output_t
190190
void setup_flex_table_columns(flex_table_t *table);
191191
void setup_indexes(flex_table_t *table);
192192

193+
// Get the flex table that is as first parameter on the Lua stack.
193194
flex_table_t const &get_table_from_param();
194195

195196
void check_context_and_state(char const *name, char const *context,

0 commit comments

Comments
 (0)