Skip to content

Commit c5e6385

Browse files
committed
Simplify the code somewhat
1 parent 0f9110b commit c5e6385

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/output-flex.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -846,11 +846,9 @@ void output_flex_t::pending_way(osmid_t id)
846846
way_delete(id);
847847
auto const &func = m_way_cache.get().tags().empty() ? m_process_untagged_way
848848
: m_process_way;
849-
if (!func) {
850-
return;
849+
if (func) {
850+
get_mutex_and_call_lua_function(func, m_way_cache.get());
851851
}
852-
853-
get_mutex_and_call_lua_function(func, m_way_cache.get());
854852
}
855853

856854
void output_flex_t::select_relation_members()
@@ -902,11 +900,9 @@ void output_flex_t::process_relation()
902900
auto const &func = m_relation_cache.get().tags().empty()
903901
? m_process_untagged_relation
904902
: m_process_relation;
905-
if (!func) {
906-
return;
903+
if (func) {
904+
get_mutex_and_call_lua_function(func, m_relation_cache.get());
907905
}
908-
909-
get_mutex_and_call_lua_function(func, m_relation_cache.get());
910906
}
911907

912908
void output_flex_t::pending_relation(osmid_t id)

0 commit comments

Comments
 (0)