Skip to content

Commit ecbeef7

Browse files
committed
Code style fix via clang-format
1 parent 5085018 commit ecbeef7

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

tagtransform-lua.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ lua_tagtransform_t::lua_tagtransform_t(options_t const *options)
2121
luaL_openlibs(L);
2222
if (luaL_dofile(L, options->tag_transform_script->c_str())) {
2323
throw std::runtime_error(
24-
(boost::format(
25-
"Lua tag transform style error: %1%") %
24+
(boost::format("Lua tag transform style error: %1%") %
2625
lua_tostring(L, -1))
2726
.str());
2827
}

tests/test-options-parse.cpp

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,22 @@ void test_outputs()
135135
void test_lua_styles()
136136
{
137137
#ifdef HAVE_LUA
138-
const char* a1[] = {"osm2pgsql", "--tag-transform-script", "non_existing.lua", "tests/liechtenstein-2013-08-03.osm.pbf"};
138+
const char *a1[] = {"osm2pgsql", "--tag-transform-script",
139+
"non_existing.lua",
140+
"tests/liechtenstein-2013-08-03.osm.pbf"};
139141
options_t options = options_t(len(a1), const_cast<char **>(a1));
140-
141-
try
142-
{
143-
std::unique_ptr<tagtransform_t> tagtransform = tagtransform_t::make_tagtransform(&options);
142+
143+
try {
144+
std::unique_ptr<tagtransform_t> tagtransform =
145+
tagtransform_t::make_tagtransform(&options);
144146
throw std::logic_error("Expected 'No such file or directory'");
145-
}
146-
catch(const std::runtime_error& e)
147-
{
148-
if(!alg::icontains(e.what(), "No such file or directory"))
149-
throw std::logic_error((boost::format("Expected 'No such file or directory' but instead got '%1%'") % e.what()).str());
147+
} catch (const std::runtime_error &e) {
148+
if (!alg::icontains(e.what(), "No such file or directory"))
149+
throw std::logic_error(
150+
(boost::format("Expected 'No such file or directory' but "
151+
"instead got '%1%'") %
152+
e.what())
153+
.str());
150154
}
151155
#endif
152156
}

0 commit comments

Comments
 (0)