Skip to content

Commit ff73430

Browse files
committed
Fixes some problems with the last commit
1 parent 4e456e9 commit ff73430

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/locator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ void locator_t::build_index()
8282
m_data.emplace_back(region.box(), n++);
8383
}
8484

85+
m_rtree.clear();
8586
m_rtree.insert(m_data.cbegin(), m_data.cend());
8687
}
8788

tests/bdd/flex/locator.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Feature: Locators
4545
NAME[]
4646
"""
4747

48-
Scenario: Define a locator without name is okay
48+
Scenario: Calling name() on locator with . instead of : does not work
4949
Given the OSM data
5050
"""
5151
"""

tests/bdd/steps/steps_execute.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ def setup_inline_lua_style(context):
135135

136136
@given("the style file '(?P<style>.+)'")
137137
def setup_style_file(context, style):
138-
context.osm2pgsql_params.extend(('-S', str(context.test_data_dir / style)))
138+
if '-S' in context.osm2pgsql_params:
139+
context.osm2pgsql_params[context.osm2pgsql_params.index('-S') + 1] = str(context.test_data_dir / style)
140+
else:
141+
context.osm2pgsql_params.extend(('-S', str(context.test_data_dir / style)))
139142

140143

141144
@when(r"running osm2pgsql (?P<output>\w+)(?: with parameters)?")

0 commit comments

Comments
 (0)