Use std::optional instead of mbgl::optional (#911)
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
#include <mbgl/storage/file_source.hpp>
|
||||
#include <mbgl/storage/offline.hpp>
|
||||
#include <mbgl/util/expected.hpp>
|
||||
#include <mbgl/util/optional.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include <mbgl/util/geo.hpp>
|
||||
#include <mbgl/util/geometry.hpp>
|
||||
#include <mbgl/util/range.hpp>
|
||||
#include <mbgl/util/optional.hpp>
|
||||
#include <mbgl/util/variant.hpp>
|
||||
#include <mbgl/style/types.hpp>
|
||||
#include <mbgl/storage/response.hpp>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
#include <mbgl/storage/file_source.hpp>
|
||||
#include <mbgl/storage/resource_options.hpp>
|
||||
#include <mbgl/util/client_options.hpp>
|
||||
#include <mbgl/util/optional.hpp>
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
#include <mbgl/storage/response.hpp>
|
||||
#include <mbgl/util/bitmask_operations.hpp>
|
||||
#include <mbgl/util/optional.hpp>
|
||||
#include <mbgl/util/font_stack.hpp>
|
||||
#include <mbgl/util/tileset.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <optional>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
Resource(Kind kind_,
|
||||
std::string url_,
|
||||
optional<TileData> tileData_ = {},
|
||||
std::optional<TileData> tileData_ = std::nullopt,
|
||||
LoadingMethod loadingMethod_ = LoadingMethod::All)
|
||||
: kind(kind_),
|
||||
loadingMethod(loadingMethod_),
|
||||
@@ -91,11 +91,11 @@ public:
|
||||
std::string url;
|
||||
|
||||
// Includes auxiliary data if this is a tile request.
|
||||
optional<TileData> tileData;
|
||||
std::optional<TileData> tileData;
|
||||
|
||||
optional<Timestamp> priorModified = {};
|
||||
optional<Timestamp> priorExpires = {};
|
||||
optional<std::string> priorEtag = {};
|
||||
std::optional<Timestamp> priorModified = std::nullopt;
|
||||
std::optional<Timestamp> priorExpires = std::nullopt;
|
||||
std::optional<std::string> priorEtag = std::nullopt;
|
||||
std::shared_ptr<const std::string> priorData;
|
||||
Duration minimumUpdateInterval{Duration::zero()};
|
||||
StoragePolicy storagePolicy{StoragePolicy::Permanent};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <mbgl/util/chrono.hpp>
|
||||
#include <mbgl/util/optional.hpp>
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
@@ -33,9 +33,9 @@ public:
|
||||
// The actual data of the response. Present only for non-error, non-notModified responses.
|
||||
std::shared_ptr<const std::string> data;
|
||||
|
||||
optional<Timestamp> modified;
|
||||
optional<Timestamp> expires;
|
||||
optional<std::string> etag;
|
||||
std::optional<Timestamp> modified;
|
||||
std::optional<Timestamp> expires;
|
||||
std::optional<std::string> etag;
|
||||
|
||||
bool isFresh() const {
|
||||
return expires ? *expires > util::now() : !error;
|
||||
@@ -63,10 +63,10 @@ public:
|
||||
// informing the user about the reason for the failure.
|
||||
std::string message;
|
||||
|
||||
optional<Timestamp> retryAfter;
|
||||
std::optional<Timestamp> retryAfter;
|
||||
|
||||
public:
|
||||
Error(Reason, std::string = "", optional<Timestamp> = {});
|
||||
Error(Reason, std::string = "", std::optional<Timestamp> = std::nullopt);
|
||||
};
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user