Skip to content

Commit 60b17d4

Browse files
committed
Remove unnecessary and only use of boost::optional
1 parent 5b4d7c0 commit 60b17d4

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/options.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#include <osmium/osm/box.hpp>
1414

15-
#include <boost/optional.hpp>
1615
#include <memory>
1716
#include <string>
1817
#include <vector>
@@ -135,7 +134,7 @@ class options_t
135134
/// Name of the flat node file used. Empty if flat node file is not enabled.
136135
std::string flat_node_file{};
137136

138-
boost::optional<std::string> tag_transform_script{boost::none};
137+
std::string tag_transform_script;
139138

140139
bool create = false;
141140
bool pass_prompt = false;

src/tagtransform-lua.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ lua_tagtransform_t::lua_tagtransform_t(options_t const *options)
2121
: m_node_func("filter_tags_node"), m_way_func("filter_tags_way"),
2222
m_rel_func("filter_basic_tags_rel"),
2323
m_rel_mem_func("filter_tags_relation_member"),
24-
m_lua_file(options->tag_transform_script.get()),
24+
m_lua_file(options->tag_transform_script),
2525
m_extra_attributes(options->extra_attributes)
2626
{
2727
open_style();

src/tagtransform.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
* For a full list of authors see the git log.
88
*/
99

10-
#include "tagtransform.hpp"
1110
#include "config.h"
1211
#include "logging.hpp"
1312
#include "options.hpp"
1413
#include "tagtransform-c.hpp"
14+
#include "tagtransform.hpp"
1515

1616
#ifdef HAVE_LUA
1717
#include "tagtransform-lua.hpp"
@@ -21,10 +21,10 @@ std::unique_ptr<tagtransform_t>
2121
tagtransform_t::make_tagtransform(options_t const *options,
2222
export_list const &exlist)
2323
{
24-
if (options->tag_transform_script) {
24+
if (!options->tag_transform_script.empty()) {
2525
#ifdef HAVE_LUA
2626
log_debug("Using lua based tag transformations with script {}",
27-
options->tag_transform_script.get());
27+
options->tag_transform_script);
2828
return std::unique_ptr<tagtransform_t>(new lua_tagtransform_t{options});
2929
#else
3030
throw std::runtime_error{"Error: Could not init lua tag transform, as "

0 commit comments

Comments
 (0)