Skip to content

Commit eb63366

Browse files
committed
Remove unnecessary conversion of id to string
1 parent c8f4af0 commit eb63366

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/flex-table.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,11 @@ pg_result_t table_connection_t::get_geom_by_id(osmium::item_type type,
398398
{
399399
assert(table().has_geom_column());
400400
assert(m_db_connection);
401-
std::string const id_str = fmt::to_string(id);
402401
if (table().has_multicolumn_id_index()) {
403-
return m_db_connection->exec_prepared(
404-
"get_wkb", type_to_char(type), id_str.c_str());
402+
return m_db_connection->exec_prepared("get_wkb", type_to_char(type),
403+
id);
405404
}
406-
return m_db_connection->exec_prepared("get_wkb", id_str);
405+
return m_db_connection->exec_prepared("get_wkb", id);
407406
}
408407

409408
void table_connection_t::delete_rows_with(osmium::item_type type, osmid_t id)

0 commit comments

Comments
 (0)