Skip to content

Commit e59a636

Browse files
committed
basic: Replace boost::optional with std::optional
1 parent a113736 commit e59a636

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

plugins/basic/src/basic.cpp

+12-13
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,15 @@
2222

2323
#include "basic.hpp"
2424

25-
#include <chrono> // for duration<>
26-
#include <memory> // for shared_ptr<>, unique_ptr<>
27-
#include <string> // for string
28-
#include <tuple> // for tie
29-
#include <utility> // for pair, make_pair
30-
#include <vector> // for vector<>
25+
#include <chrono> // for duration<>
26+
#include <memory> // for shared_ptr<>, unique_ptr<>
27+
#include <optional> // for optional
28+
#include <string> // for string
29+
#include <tuple> // for tie
30+
#include <utility> // for pair, make_pair
31+
#include <vector> // for vector<>
3132

32-
#include <boost/optional.hpp> // for optional<>
33-
#include <fable/schema.hpp> // for Schema
34-
#include <fable/schema/boost_optional.hpp> // for Optional<>
33+
#include <fable/schema.hpp> // for Schema
3534

3635
#include <cloe/component/driver_request.hpp> // for DriverRequest
3736
#include <cloe/component/latlong_actuator.hpp> // for LatLongActuator
@@ -102,10 +101,10 @@ struct AdaptiveCruiseControl {
102101
AccConfiguration config;
103102
std::shared_ptr<Vehicle> vehicle{nullptr};
104103

105-
bool enabled{false}; // whether the function can be activated
106-
bool active{false}; // whether the function is currently active
107-
size_t distance_algorithm{0}; // index of target distance algorithm
108-
boost::optional<double> target_speed{}; // target speed in [km/h]
104+
bool enabled{false}; // whether the function can be activated
105+
bool active{false}; // whether the function is currently active
106+
size_t distance_algorithm{0}; // index of target distance algorithm
107+
std::optional<double> target_speed{}; // target speed in [km/h]
109108

110109
public:
111110
explicit AdaptiveCruiseControl(const AccConfiguration& c) : config(c) {}

0 commit comments

Comments
 (0)