Replace boost::optional with std::optional
This commit is contained in:
parent
29f11d3f57
commit
afb4fd2d4d
4 changed files with 13 additions and 13 deletions
|
@ -44,9 +44,9 @@ BOOST_FUSION_ADAPT_STRUCT(
|
|||
(std::string, unique_name)
|
||||
(std::string, name)
|
||||
(oro::ItemTypeWrapper, type)
|
||||
(boost::optional<oro::ItemSubtypeWrapper>, subtype)
|
||||
(std::optional<oro::ItemSubtypeWrapper>, subtype)
|
||||
(unsigned int, npc_price)
|
||||
(boost::optional<unsigned int>, slots)
|
||||
(std::optional<unsigned int>, slots)
|
||||
)
|
||||
|
||||
BOOST_FUSION_ADAPT_STRUCT(
|
||||
|
@ -84,9 +84,9 @@ BOOST_FUSION_ADAPT_STRUCT(
|
|||
(unsigned int, refine)
|
||||
(std::vector<unsigned int>, cards)
|
||||
(unsigned int, star_crumbs)
|
||||
(boost::optional<std::string>, element)
|
||||
(boost::optional<unsigned int>, creator)
|
||||
(boost::optional<bool>, beloved)
|
||||
(std::optional<std::string>, element)
|
||||
(std::optional<unsigned int>, creator)
|
||||
(std::optional<bool>, beloved)
|
||||
)
|
||||
|
||||
BOOST_FUSION_ADAPT_STRUCT(
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "datatypes.hpp"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <boost/optional.hpp>
|
||||
#include <optional>
|
||||
|
||||
namespace oro {
|
||||
enum class ItemType {
|
||||
|
@ -102,9 +102,9 @@ namespace oro {
|
|||
std::string unique_name;
|
||||
std::string name;
|
||||
ItemTypeWrapper type;
|
||||
boost::optional<ItemSubtypeWrapper> subtype;
|
||||
std::optional<ItemSubtypeWrapper> subtype;
|
||||
unsigned int npc_price;
|
||||
boost::optional<unsigned int> slots;
|
||||
std::optional<unsigned int> slots;
|
||||
};
|
||||
|
||||
struct Items : BaseJsonReply {
|
||||
|
|
|
@ -158,7 +158,7 @@ namespace {
|
|||
};
|
||||
|
||||
template <typename CastT=void, typename T=void>
|
||||
void bind (SQLite::Statement& st, int idx, const boost::optional<T>& val) {
|
||||
void bind (SQLite::Statement& st, int idx, const std::optional<T>& val) {
|
||||
if (val) {
|
||||
if constexpr (std::is_same_v<T, CastT> or std::is_same_v<void, CastT>) {
|
||||
st.bind(idx, *val);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "datatypes.hpp"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <boost/optional.hpp>
|
||||
#include <optional>
|
||||
|
||||
namespace oro {
|
||||
enum class ShopType {
|
||||
|
@ -52,9 +52,9 @@ namespace oro {
|
|||
unsigned int refine{};
|
||||
std::vector<unsigned int> cards;
|
||||
unsigned int star_crumbs{};
|
||||
boost::optional<std::string> element;
|
||||
boost::optional<unsigned int> creator;
|
||||
boost::optional<bool> beloved;
|
||||
std::optional<std::string> element;
|
||||
std::optional<unsigned int> creator;
|
||||
std::optional<bool> beloved;
|
||||
};
|
||||
|
||||
struct Shop {
|
||||
|
|
Loading…
Reference in a new issue