[core] Use expected.hpp from mapbox-base
This commit is contained in:
@@ -10,7 +10,6 @@ target_include_directories(mbgl-core
|
||||
target_link_libraries(mbgl-core PRIVATE
|
||||
mbgl-vendor-earcut.hpp
|
||||
mbgl-vendor-eternal
|
||||
mbgl-vendor-expected
|
||||
mbgl-vendor-geojson-vt-cpp
|
||||
mbgl-vendor-shelf-pack-cpp
|
||||
mbgl-vendor-unique_resource
|
||||
@@ -32,6 +31,7 @@ target_link_libraries(mbgl-core PUBLIC
|
||||
mbgl-vendor-polylabel
|
||||
mbgl-vendor-protozero
|
||||
Mapbox::Base::Extras::rapidjson
|
||||
Mapbox::Base::Extras::expected-lite
|
||||
mbgl-vendor-vector-tile
|
||||
)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ target_include_directories(mbgl-filesource
|
||||
|
||||
target_link_libraries(mbgl-filesource
|
||||
PUBLIC mbgl-core
|
||||
PUBLIC mbgl-vendor-expected
|
||||
PUBLIC Mapbox::Base::Extras::expected-lite
|
||||
)
|
||||
|
||||
mbgl_filesource()
|
||||
|
||||
@@ -49,7 +49,7 @@ target_link_libraries(
|
||||
mbgl-core
|
||||
mbgl-filesource
|
||||
Mapbox::Base::Extras::args
|
||||
mbgl-vendor-expected
|
||||
Mapbox::Base::Extras::expected-lite
|
||||
Mapbox::Base::Extras::filesystem
|
||||
Mapbox::Base::pixelmatch-cpp
|
||||
Mapbox::Base::Extras::rapidjson
|
||||
|
||||
@@ -8,7 +8,6 @@ include(${CMAKE_SOURCE_DIR}/vendor/boost.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/vendor/cheap-ruler-cpp.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/vendor/earcut.hpp.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/vendor/eternal.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/vendor/expected.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/vendor/geojson-vt-cpp.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/vendor/googletest.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/vendor/icu.cmake)
|
||||
|
||||
@@ -32,12 +32,12 @@ public:
|
||||
OfflineTilePyramidRegionDefinition(std::string, LatLngBounds, double, double, float, bool);
|
||||
|
||||
/* Private */
|
||||
const std::string styleURL;
|
||||
const LatLngBounds bounds;
|
||||
const double minZoom;
|
||||
const double maxZoom;
|
||||
const float pixelRatio;
|
||||
const bool includeIdeographs;
|
||||
std::string styleURL;
|
||||
LatLngBounds bounds;
|
||||
double minZoom;
|
||||
double maxZoom;
|
||||
float pixelRatio;
|
||||
bool includeIdeographs;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -56,12 +56,12 @@ public:
|
||||
OfflineGeometryRegionDefinition(std::string styleURL, Geometry<double>, double minZoom, double maxZoom, float pixelRatio, bool includeIdeographs);
|
||||
|
||||
/* Private */
|
||||
const std::string styleURL;
|
||||
const Geometry<double> geometry;
|
||||
const double minZoom;
|
||||
const double maxZoom;
|
||||
const float pixelRatio;
|
||||
const bool includeIdeographs;
|
||||
std::string styleURL;
|
||||
Geometry<double> geometry;
|
||||
double minZoom;
|
||||
double maxZoom;
|
||||
float pixelRatio;
|
||||
bool includeIdeographs;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -211,14 +211,8 @@ public:
|
||||
|
||||
class OfflineRegion {
|
||||
public:
|
||||
// Move-only; not publicly constructible.
|
||||
OfflineRegion(OfflineRegion&&);
|
||||
~OfflineRegion();
|
||||
|
||||
OfflineRegion() = delete;
|
||||
OfflineRegion(const OfflineRegion&) = delete;
|
||||
OfflineRegion& operator=(OfflineRegion&&) = delete;
|
||||
OfflineRegion& operator=(const OfflineRegion&) = delete;
|
||||
|
||||
int64_t getID() const;
|
||||
const OfflineRegionDefinition& getDefinition() const;
|
||||
@@ -231,9 +225,9 @@ private:
|
||||
OfflineRegionDefinition,
|
||||
OfflineRegionMetadata);
|
||||
|
||||
const int64_t id;
|
||||
const OfflineRegionDefinition definition;
|
||||
const OfflineRegionMetadata metadata;
|
||||
int64_t id;
|
||||
OfflineRegionDefinition definition;
|
||||
OfflineRegionMetadata metadata;
|
||||
};
|
||||
|
||||
using OfflineRegions = std::vector<OfflineRegion>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <expected.hpp>
|
||||
#include <nonstd/expected.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ mbgl_vendor_library("icu")
|
||||
mbgl_vendor_library("boost")
|
||||
mbgl_vendor_library("cheap-ruler-cpp")
|
||||
mbgl_vendor_library("earcut.hpp")
|
||||
mbgl_vendor_library("expected")
|
||||
mbgl_vendor_library("eternal")
|
||||
mbgl_vendor_library("geojson-vt-cpp")
|
||||
mbgl_vendor_library("mapbox-base")
|
||||
|
||||
@@ -890,7 +890,6 @@ endif(NOT TARGET mapbox-base)
|
||||
include(${PROJECT_SOURCE_DIR}/vendor/boost.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/vendor/earcut.hpp.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/vendor/eternal.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/vendor/expected.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/vendor/geojson-vt-cpp.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/vendor/polylabel.cmake)
|
||||
include(${PROJECT_SOURCE_DIR}/vendor/protozero.cmake)
|
||||
@@ -915,6 +914,7 @@ target_link_libraries(
|
||||
mbgl-vendor-vector-tile
|
||||
mbgl-vendor-wagyu
|
||||
PUBLIC
|
||||
Mapbox::Base::Extras::expected-lite
|
||||
Mapbox::Base::Extras::rapidjson
|
||||
Mapbox::Base::geojson.hpp
|
||||
Mapbox::Base::geometry.hpp
|
||||
@@ -923,7 +923,6 @@ target_link_libraries(
|
||||
Mapbox::Base::value
|
||||
Mapbox::Base::variant
|
||||
Mapbox::Base::weak
|
||||
mbgl-vendor-expected
|
||||
)
|
||||
|
||||
set_property(TARGET mbgl-core PROPERTY FOLDER Core)
|
||||
|
||||
@@ -150,7 +150,6 @@ OfflineRegion::OfflineRegion(int64_t id_,
|
||||
metadata(std::move(metadata_)) {
|
||||
}
|
||||
|
||||
OfflineRegion::OfflineRegion(OfflineRegion&&) = default;
|
||||
OfflineRegion::~OfflineRegion() = default;
|
||||
|
||||
const OfflineRegionDefinition& OfflineRegion::getDefinition() const {
|
||||
|
||||
@@ -130,12 +130,12 @@ generateFileList('vendor/boost-files.json', [ 'vendor/boost' ], vendorRegex, [ "
|
||||
generateFileList('vendor/cheap-ruler-cpp-files.json', [ 'vendor/cheap-ruler-cpp' ], vendorRegex, [ "include/**/*.hpp" ]);
|
||||
generateFileList('vendor/earcut.hpp-files.json', [ 'vendor/earcut.hpp' ], vendorRegex, [ "include/**/*.hpp" ]);
|
||||
generateFileList('vendor/eternal-files.json', [ 'vendor/eternal' ], vendorRegex, [ "include/**/*.hpp" ]);
|
||||
generateFileList('vendor/expected-files.json', [ 'vendor/expected' ], vendorRegex, [ "include/expected.hpp" ]);
|
||||
generateFileList('vendor/geojson-vt-cpp-files.json', [ 'vendor/geojson-vt-cpp' ], vendorRegex, [ "include/**/*.hpp" ]);
|
||||
generateFileList('vendor/icu-files.json', [ 'vendor/icu' ], vendorRegex, [ "include/**/*.h", "src/*.h", "src/*.cpp" ]);
|
||||
generateFileList('vendor/mapbox-base-files.json',
|
||||
[ 'vendor/mapbox-base/extras/kdbush.hpp',
|
||||
'vendor/mapbox-base/extras/filesystem',
|
||||
'vendor/mapbox-base/extras/expected-lite',
|
||||
'vendor/mapbox-base/extras/rapidjson',
|
||||
'vendor/mapbox-base/mapbox/pixelmatch-cpp',
|
||||
'vendor/mapbox-base/mapbox/geometry.hpp',
|
||||
|
||||
@@ -53,7 +53,6 @@ rsync -rR $(git ls-files \
|
||||
|
||||
echo ">> Copying vendored files..."
|
||||
rsync -rR $(git ls-files \
|
||||
"vendor/expected" \
|
||||
"vendor/icu" \
|
||||
"vendor/nunicode" \
|
||||
"vendor/sqlite" \
|
||||
|
||||
8
vendor/expected-files.json
vendored
8
vendor/expected-files.json
vendored
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"//": "This file is generated. Do not edit. Regenerate it with scripts/generate-file-lists.js",
|
||||
"sources": [],
|
||||
"public_headers": {
|
||||
"expected.hpp": "vendor/expected/include/expected.hpp"
|
||||
},
|
||||
"private_headers": {}
|
||||
}
|
||||
9
vendor/expected.cmake
vendored
9
vendor/expected.cmake
vendored
@@ -1,9 +0,0 @@
|
||||
if(TARGET mbgl-vendor-expected)
|
||||
return()
|
||||
endif()
|
||||
|
||||
add_library(mbgl-vendor-expected INTERFACE)
|
||||
|
||||
target_include_directories(mbgl-vendor-expected SYSTEM INTERFACE
|
||||
${CMAKE_CURRENT_LIST_DIR}/expected/include
|
||||
)
|
||||
23
vendor/expected/LICENSE.txt
vendored
23
vendor/expected/LICENSE.txt
vendored
@@ -1,23 +0,0 @@
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
1
vendor/expected/files.txt
vendored
1
vendor/expected/files.txt
vendored
@@ -1 +0,0 @@
|
||||
include/expected.hpp
|
||||
1708
vendor/expected/include/expected.hpp
vendored
1708
vendor/expected/include/expected.hpp
vendored
File diff suppressed because it is too large
Load Diff
1
vendor/expected/version.txt
vendored
1
vendor/expected/version.txt
vendored
@@ -1 +0,0 @@
|
||||
a2359cf61478d735a308e952b1c9840714f61386
|
||||
1
vendor/mapbox-base-files.json
vendored
1
vendor/mapbox-base-files.json
vendored
@@ -2,6 +2,7 @@
|
||||
"//": "This file is generated. Do not edit. Regenerate it with scripts/generate-file-lists.js",
|
||||
"sources": [],
|
||||
"public_headers": {
|
||||
"nonstd/expected.hpp": "vendor/mapbox-base/extras/expected-lite/include/nonstd/expected.hpp",
|
||||
"ghc/filesystem.hpp": "vendor/mapbox-base/extras/filesystem/include/ghc/filesystem.hpp",
|
||||
"ghc/fs_fwd.hpp": "vendor/mapbox-base/extras/filesystem/include/ghc/fs_fwd.hpp",
|
||||
"ghc/fs_impl.hpp": "vendor/mapbox-base/extras/filesystem/include/ghc/fs_impl.hpp",
|
||||
|
||||
Reference in New Issue
Block a user