8000 [bindgen] Upgrade to core v13.15.1 by kraenhansen · Pull Request #6726 · realm/realm-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[bindgen] Upgrade to core v13.15.1 #6726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 74 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
aec66d8
Merge pull request #6620 from realm/release/13.11.0
ironage May 12, 2023
11e6f55
Updated release notes
May 12, 2023
d8721d7
Update catch2 v3.3.2 (#6605)
May 13, 2023
1620cd9
Make core infer platform and cpu_arch, while bundle_id must be provid…
danieltabacaru May 15, 2023
62cba7f
use consistent rounding, following SERVER-75392 (#6477)
ironage May 15, 2023
65bb2e8
fix entries that went to the wrong change version (#6632)
ironage May 16, 2023
9412b24
Special-case main thread runloop scheduler
tgoyne Jan 27, 2023
601805b
Improve SectionedResults performance
tgoyne Jan 25, 2023
09895d1
Merge pull request #6606 from realm/tg/sectioned-perf
tgoyne May 16, 2023
e6cc4bc
use static_assert rather than a old home rolled one
ironage May 16, 2023
383d537
fix warning of redefine of CHECK macro
ironage < 10000 relative-time datetime="2023-05-16T21:59:13Z" class="no-wrap">May 16, 2023
e49052c
fix unused function warning
ironage May 16, 2023
7b323cb
silence warnings in bid128_to_string
ironage May 16, 2023
df5d11c
Merge pull request #6637 from realm/js/warnings
ironage May 17, 2023
d5278c3
Introduce BPlusTree::for_all
jedelbo May 17, 2023
e1b3767
Prevent program from crashing when removing backlinks
jedelbo May 17, 2023
474b196
Merge pull request #6638 from realm/je/fix-backlink-removal
jedelbo May 17, 2023
13bc35f
Fix broken snapshot of collection of objects
jedelbo May 17, 2023
a27938b
Fix importing Results with deleted collection
jedelbo May 17, 2023
1b80764
geospatial validation of polygons (#6607)
ironage May 17, 2023
6cc16a6
Benchmark for full-text search
May 18, 2023
5ab46c6
Filter out unresolved links in Dictionary::get_any()
tgoyne May 17, 2023
4432ae8
Add support for early exit in BPlusTree::for_all()
tgoyne May 18, 2023
128f3c0
Geospatial feedback (#6645)
ironage May 19, 2023
4536bc2
Merge pull request #6644 from realm/tg/unresolved-link
tgoyne May 19, 2023
2d8fb23
Geospatial basic queries benchmarks (#6621)
May 19, 2023
f0e6653
Updated baas server tag for CI (#6650)
May 19, 2023
096d9ba
Prepare release
jedelbo May 20, 2023
786cd7c
Updated release notes
May 22, 2023
61e2050
Merge pull request #6654 from realm/release/13.12.0
jedelbo May 22, 2023
cb9b80b
Access token refresh for websockets was not updating the location met…
May 23, 2023
dcf925e
maybe fix a race in a test (#6651)
ironage May 23, 2023
0ac57c5
Use std::optional to store cached leaves in query nodes (#6653)
tgoyne May 23, 2023
2ac0b94
Fix a few UBSan failures hit by tests
tgoyne May 19, 2023
570b9d7
Avoid performing unaligned reads in Array::get_chunk()
tgoyne May 19, 2023
61da27e
Merge pull request #6649 from realm/tg/ub
tgoyne May 24, 2023
5bc5f3b
Fix a lock order inversion in tests (#6666)
tgoyne May 25, 2023
8339bfb
Allow geo coordinate numeric argument substitutions (#6663)
ironage May 25, 2023
75ae0e0
Remove catch() clause to prevent truncating stack trace in AsyncOper:…
May 26, 2023
85a4e63
Fix an assertion failure if an async write callback ran during a writ…
tgoyne May 26, 2023
36b2df4
core release 13.13.0
nicola-cab May 26, 2023
3b2d5ce
Merge pull request #6678 from realm/release/13.13.0
nicola-cab May 26, 2023
f6f5dc1
Updated release notes
May 26, 2023
a172b42
Allocate arguments for lists (#6674)
nicola-cab May 29, 2023
fdecf14
Small documentation and code fixes (#6672)
danieltabacaru May 29, 2023
6996885
Fix crash when opening FLX realm after client reset failure (#6671)
danieltabacaru May 30, 2023
79183be
Support sorting based on values from a dictionary (#5311)
jedelbo May 30, 2023
3cbab03
Filter out external sources from Eclipse (#6682)
jedelbo May 30, 2023
0cbe877
Use cross-compilers instead of CentOS image (#6559)
fealebenpae May 31, 2023
541190d
Remap github URL to ssh to fix BAAS dependency using https:// (#6685)
May 31, 2023
95eb5fc
core v13.14.0
nicola-cab Jun 2, 2023
48ec3e7
Merge pull request #6691 from realm/release/13.14.0
nicola-cab Jun 2, 2023
4f8f18d
Updated release notes
Jun 2, 2023
0f294cf
Switch to building with Xcode 14 (#6647)
tgoyne Jun 5, 2023
c19472b
better fix explanation in the changelog for list of args in the query…
nicola-cab Jun 6, 2023
398f189
Remove constructor for GeoPoint and GeoPolygon (#6679)
papafe Jun 6, 2023
895d480
Fix failing "sync: non-synced metadata table doesn't result in non-ad…
Jun 7, 2023
795bb4b
Reporting correct error message on HTTP errors for Browser target
nhachicha Jun 7, 2023
9c31164
Merge pull request #6700 from realm/nh/wasm/report_http_error
nhachicha Jun 7, 2023
f972ba9
User/Server API key provider becomes a single 'API key' provider (#6696)
ironage Jun 8, 2023
5d4a092
Allow frozen Realms to be opened with additive schema changes (#6693)
ironage Jun 9, 2023
80d47a7
Reverted minimum swift version to fix failing CI tests (#6706)
Jun 9, 2023
93cc224
core release v13.15.0
Jun 9, 2023
5bc9a8e
Merge pull request #6709 from realm/release/13.15.0
Jun 9, 2023
2cfb24b
Updated release notes
Jun 9, 2023
2eb2a60
Fix client reset test with invalid query (#6711)
danieltabacaru Jun 13, 2023
1832986
Fix SessionWrapper use-after-free crash when tearing down sessions (#…
Jun 13, 2023
d2c4e10
Add [baas] and [local] tags to object store sync tests to identify th…
Jun 13, 2023
d861035
Use Columns<Link> when property is Dictionary of links (#6705)
jedelbo Jun 14, 2023
9fd4144
better changelog message for the fix related to queries with list of …
nicola-cab Jun 15, 2023
72eedc0
Fixes for Emscripten target (Passing header from fetch response. Usin…
nhachicha Jun 15, 2023
f1434ca
release 13.15.1
finnschiermer Jun 16, 2023
1999915
Upgrade to Realm Core v13.15.1
kraenhansen Jun 19, 2023
8be7864
Updated spec.yml to remove User & Server prefix from ApiKey credentials
kraenhansen Jun 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,24 @@
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
<filteredResources>
<filter>
<id>1684928805201</id>
<name>external</name>
<type>30</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-catch</arguments>
</matcher>
</filter>
<filter>
<id>1684928848403</id>
<name>src/external</name>
<type>14</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-*</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
# 13.15.1 Release notes

### Fixed
* Querying with object list arguments does not work. ([#6688](https://github.com/realm/realm-core/issues/6688), since v10.3.3)
* Fix SessionWrapper use-after-free crash when tearing down sessions when using session multiplexing ([#6656](https://github.com/realm/realm-core/issues/6656), since v13.9.3)

### Breaking changes
* None.

### Compatibility
* Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.

----------------------------------------------

# 13.15.0 Release notes

### Enhancements
* It is now allowed to open old frozen versions with a schema that contains additional classes, but not additional properties. ([PR 6693](https://github.com/realm/realm-core/issues/6693))

### Fixed
* Properties in the frozen _before_ Realm instance in the client reset callbacks may have had properties reordered which could lead to exceptions if accessed. ([PR 6693](https://github.com/realm/realm-core/issues/6693), since v13.11.0)

### Breaking changes
* A new provider called `IdentityProviderAPIKey` replaces both `IdentityProviderUserAPIKey` and `IdentityProviderServerAPIKey` since those two did the same thing. If SDKs wish to keep the old behaviour without requiring users to make code changes, they can adapt both their existing server and user API key providers to use the new core type. ([#5914](https://github.com/realm/realm-core/issues/5914))

### Compatibility
* Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.

-----------

### Internals
* Prebuilt libraries for Apple platforms are now built with Xcode 14.

----------------------------------------------

# 13.14.0 Release notes


### Enhancements
* Support sort/distinct based on values from a dictionary e.g. `TRUEPREDICATE SORT(meta['age'])` (PR [#5311](https://github.com/realm/realm-core/pull/5311))

### Fixed
* Querying with list of objects as argument will always return an empty result. ([#6674](https://github.com/realm/realm-core/pull/6674), since v12.5.0)
* Fixed a potential crash when opening the realm after failing to download a fresh FLX realm during an automatic client reset ([#6494](https://github.com/realm/realm-core/issues/6494), since v12.3.0)

### Breaking changes
* None.

### Compatibility
* Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.

-----------

### Internals
* Added CMake toolchains for cross-targeting Linux x86_64, armv7, and aarch64. (PR [#6559](https://github.com/realm/realm-core/pull/6559))

----------------------------------------------

# 13.13.0 Release notes

### Enhancements
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ endif()
# Just use -lz and let Xcode figure it out
# Emscripten does provide Zlib, but it doesn't work with find_package and is handled specially
if(NOT APPLE AND NOT EMSCRIPTEN AND NOT TARGET ZLIB::ZLIB)
if(WIN32)
realm_acquire_dependency(zlib ${DEP_WIN32_ZLIB_VERSION} ZLIB_CMAKE_INCLUDE_FILE)
if(WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND REALM_LINUX_TOOLCHAIN))
realm_acquire_dependency(zlib ${DEP_ZLIB_VERSION} ZLIB_CMAKE_INCLUDE_FILE)
include(${ZLIB_CMAKE_INCLUDE_FILE})
elseif(ANDROID)
# On Android FindZLIB chooses the static libz over the dynamic one, but this leads to issues
Expand Down
29 changes: 17 additions & 12 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ jobWrapper {

parallelExecutors = [
buildLinuxRelease : doBuildLinux('Release'),
checkLinuxDebug : doCheckInDocker(buildOptions),
checkLinuxDebug : doCheckInDocker(buildOptions + [useToolchain : true]),
checkLinuxDebugEncrypt : doCheckInDocker(buildOptions + [useEncryption : true]),
checkLinuxRelease_4 : doCheckInDocker(buildOptions + [maxBpNodeSize: 4, buildType : 'Release']),
checkLinuxRelease_4 : doCheckInDocker(buildOptions + [maxBpNodeSize: 4, buildType : 'Release', useToolchain : true]),
checkLinuxDebug_Sync : doCheckInDocker(buildOptions + [enableSync: true, dumpChangesetTransform: true]),
checkLinuxDebugNoEncryp : doCheckInDocker(buildOptions + [enableEncryption: false]),
checkMacOsRelease_Sync : doBuildMacOs(buildOptions + [buildType: 'Release', enableSync: true]),
Expand Down Expand Up @@ -251,7 +251,7 @@ def doCheckInDocker(Map options = [:]) {
rlmNode('docker') {
getArchive()

def buildEnv = buildDockerEnv('testing.Dockerfile')
def buildEnv = buildDockerEnv('linux.Dockerfile')

def environment = environment()
environment << 'UNITTEST_XML=unit-test-report.xml'
Expand All @@ -260,6 +260,12 @@ def doCheckInDocker(Map options = [:]) {
environment << 'UNITTEST_ENCRYPT_ALL=1'
}

// We don't enable this by default, because using a toolchain with its own sysroot
// prevents CMake from finding system libraries like curl which we use in sync tests.
if (options.useToolchain) {
cmakeDefinitions += " -DCMAKE_TOOLCHAIN_FILE=\"${env.WORKSPACE}/tools/cmake/x86_64-linux-gnu.toolchain.cmake\""
}

def buildSteps = { String dockerArgs = "" ->
buildEnv.inside(dockerArgs) {
withEnv(environment) {
Expand Down Expand Up @@ -351,7 +357,7 @@ def doCheckSanity(Map options = [:]) {
"UNITTEST_SUITE_NAME=Linux-${options.buildType}",
"TSAN_OPTIONS=\"suppressions=${WORKSPACE}/test/tsan.suppress\""
]
buildDockerEnv('testing.Dockerfile').inside(privileged) {
buildDockerEnv('linux.Dockerfile').inside(privileged) {
withEnv(environment) {
try {
dir('build-dir') {
Expand Down Expand Up @@ -379,12 +385,12 @@ def doBuildLinux(String buildType) {
rlmNode('docker') {
getSourceArchive()

buildDockerEnv('packaging.Dockerfile').inside {
buildDockerEnv('linux.Dockerfile').inside {
sh """
rm -rf build-dir
mkdir build-dir
cd build-dir
cmake -DCMAKE_BUILD_TYPE=${buildType} -DREALM_NO_TESTS=1 -DREALM_VERSION="${gitDescribeVersion}" -G Ninja ..
cmake -DCMAKE_BUILD_TYPE=${buildType} -DCMAKE_TOOLCHAIN_FILE=../tools/cmake/x86_64-linux-gnu.toolchain.cmake -DREALM_NO_TESTS=1 -DREALM_VERSION="${gitDescribeVersion}" -G Ninja ..
ninja
cpack -G TGZ
"""
Expand All @@ -410,7 +416,7 @@ def doBuildLinuxClang(String buildType) {
'CXX=clang++'
]

buildDockerEnv('testing.Dockerfile').inside {
buildDockerEnv('linux.Dockerfile').inside {
withEnv(environment) {
dir('build-dir') {
sh "cmake -D CMAKE_BUILD_TYPE=${buildType} -DREALM_NO_TESTS=1 -DREALM_VERSION=\"${gitDescribeVersion}\" -G Ninja .."
Expand Down Expand Up @@ -645,7 +651,7 @@ def doBuildMacOs(Map options = [:]) {
getArchive()

dir('build-macosx') {
withEnv(['DEVELOPER_DIR=/Applications/Xcode-13.1.app/Contents/Developer/']) {
withEnv(['DEVELOPER_DIR=/Applications/Xcode-14.app/Contents/Developer/']) {
// This is a dirty trick to work around a bug in xcode
// It will hang if launched on the same project (cmake trying the compiler out)
// in parallel.
Expand All @@ -663,7 +669,7 @@ def doBuildMacOs(Map options = [:]) {
)
}
}
withEnv(['DEVELOPER_DIR=/Applications/Xcode-13.1.app/Contents/Developer']) {
withEnv(['DEVELOPER_DIR=/Applications/Xcode-14.app/Contents/Developer']) {
runAndCollectWarnings(
parser: 'clang',
script: 'xcrun swift build',
Expand Down Expand Up @@ -706,8 +712,7 @@ def doBuildApplePlatform(String platform, String buildType, boolean test = false
rlmNode('osx') {
getArchive()

withEnv(['DEVELOPER_DIR=/Applications/Xcode-13.1.app/Contents/Developer/',
'XCODE_14_DEVELOPER_DIR=/Applications/Xcode-14.app/Contents/Developer/']) {
withEnv(['DEVELOPER_DIR=/Applications/Xcode-14.app/Contents/Developer/']) {
sh "tools/build-apple-device.sh -p '${platform}' -c '${buildType}' -v '${gitDescribeVersion}'"

if (test) {
Expand Down Expand Up @@ -778,7 +783,7 @@ def doBuildCoverage() {
rlmNode('docker') {
getArchive()

buildDockerEnv('testing.Dockerfile').inside {
buildDockerEnv('linux.Dockerfile').inside {
sh '''
mkdir build
cd build
Expand Down
11 changes: 1 addition & 10 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import PackageDescription
import Foundation

let versionStr = "13.13.0"
let versionStr = "13.15.1"
let versionPieces = versionStr.split(separator: "-")
let versionCompontents = versionPieces[0].split(separator: ".")
let versionExtra = versionPieces.count > 1 ? versionPieces[1] : ""
Expand Down Expand Up @@ -348,21 +348,12 @@ let bidExcludes: [String] = [
"wcstod64.c",
]

#if swift(>=5.7)
let platforms: [SupportedPlatform] = [
.macOS(.v10_13),
.iOS(.v11),
.tvOS(.v11),
.watchOS(.v4)
]
#else
let platforms: [SupportedPlatform] = [
.macOS(.v10_10),
.iOS(.v11),
.tvOS(.v9),
.watchOS(.v2)
]
#endif

let package = Package(
name: "RealmDatabase",
Expand Down
6 changes: 2 additions & 4 deletions bindgen/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@ enums:
- CUSTOM
- USERNAME_PASSWORD
- FUNCTION
- USER_API_KEY
- SERVER_API_KEY
- API_KEY
MetadataMode:
cppName: SyncClientConfig::MetadataMode
values:
Expand Down Expand Up @@ -1066,8 +1065,7 @@ classes:
- '(serialized_payload: const EJsonObj&) -> AppCredentials'
- sig: '(payload: const bson::BsonDocument&) -> AppCredentials'
suffix: 'bson'
user_api_key: '(api_key: std::string) -> AppCredentials'
server_api_key: '(api_key: std::string) -> AppCredentials'
api_key: '(api_key: std::string) -> AppCredentials'
properties:
provider: AuthProvider
provider_as_string: std::string
Expand Down
6 changes: 3 additions & 3 deletions dependencies.list
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE_NAME=realm-core
VERSION=13.13.0
VERSION=13.15.1
OPENSSL_VERSION=3.0.8
WIN32_ZLIB_VERSION=1.2.13
MDBREALM_TEST_SERVER_TAG=2023-05-05
ZLIB_VERSION=1.2.13
MDBREALM_TEST_SERVER_TAG=2023-06-13
2 changes: 1 addition & 1 deletion evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ tasks:
export DEVELOPER_DIR="${xcode_developer_dir}"
fi

./evergreen/install_baas.sh -w ./baas-work-dir -b df5aafd817ba377744d32976c15b175c9b68685a 2>&1 | tee install_baas_output.log
./evergreen/install_baas.sh -w ./baas-work-dir -b 2e23bf2f77d85f3e2fbe07e1c448e4d1cafa3a10 2>&1 | tee install_baas_output.log
fi

- command: shell.exec
Expand Down
3 changes: 3 additions & 0 deletions evergreen/install_baas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ if [[ ! -x baas_dep_binaries/jq ]]; then
cd -
fi

# Fix incompatible github path that was changed in a BAAS dependency
git config --global url."git@github.com:".insteadOf "https://github.com/"

if [[ -z "$BAAS_VERSION" ]]; then
BAAS_VERSION=$($CURL -LsS "https://realm.mongodb.com/api/private/v1.0/version" | jq -r '.backend.git_hash')
fi
Expand Down
2 changes: 1 addition & 1 deletion external/catch
Submodule catch updated 470 files
File renamed without changes.
2 changes: 0 additions & 2 deletions packaging.Dockerfile

This file was deleted.

6 changes: 2 additions & 4 deletions src/realm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2751,8 +2751,7 @@ typedef enum realm_auth_provider {
RLM_AUTH_PROVIDER_CUSTOM,
RLM_AUTH_PROVIDER_EMAIL_PASSWORD,
RLM_AUTH_PROVIDER_FUNCTION,
RLM_AUTH_PROVIDER_USER_API_KEY,
RLM_AUTH_PROVIDER_SERVER_API_KEY,
RLM_AUTH_PROVIDER_API_KEY,
} realm_auth_provider_e;

typedef struct realm_app_user_apikey {
Expand Down Expand Up @@ -2828,8 +2827,7 @@ RLM_API realm_app_credentials_t* realm_app_credentials_new_apple(const char* id_
RLM_API realm_app_credentials_t* realm_app_credentials_new_jwt(const char* jwt_token) RLM_API_NOEXCEPT;
RLM_API realm_app_credentials_t* realm_app_credentials_new_email_password(const char* email,
realm_string_t password) RLM_API_NOEXCEPT;
RLM_API realm_app_credentials_t* realm_app_credentials_new_user_api_key(const char* api_key) RLM_API_NOEXCEPT;
RLM_API realm_app_credentials_t* realm_app_credentials_new_server_api_key(const char* api_key) RLM_API_NOEXCEPT;
RLM_API realm_app_credentials_t* realm_app_credentials_new_api_key(const char* api_key) RLM_API_NOEXCEPT;

/**
* Create Custom Function authentication app credentials.
Expand Down
8 changes: 8 additions & 0 deletions src/realm/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2776,6 +2776,14 @@ DBRef DB::create(std::unique_ptr<Replication> repl, const DBOptions& options) NO
return retval;
}

DBRef DB::create_in_memory(std::unique_ptr<Replication> repl, const std::string& in_memory_path,
const DBOptions& options) NO_THREAD_SAFETY_ANALYSIS
{
DBRef db = create(std::move(repl), options);
db->m_db_path = in_memory_path;
return db;
}

DBRef DB::create(BinaryData buffer, bool take_ownership) NO_THREAD_SAFETY_ANALYSIS
{
DBOptions options;
Expand Down
4 changes: 4 additions & 0 deletions src/realm/db.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ class DB : public std::enable_shared_from_this<DB> {
const DBOptions& options = DBOptions());
static DBRef create(BinaryData, bool take_ownership = true);
static DBRef create(std::unique_ptr<Replication> repl, const DBOptions& options = DBOptions());
// file is used to set the `db_path` used to register and associate a users's SyncSession with the Realm path (see SyncUser::register_session)
// SyncSession::path() relies on the registered `m_db->get_path`
static DBRef create_in_memory(std::unique_ptr<Replication> repl, const std::string& file,
const DBOptions& options = DBOptions());

~DB() noexcept;

Expand Down
39 changes: 0 additions & 39 deletions src/realm/geospatial.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,6 @@ class TableRef;
class Geospatial;

struct GeoPoint {
GeoPoint() = delete;
GeoPoint(double lon, double lat)
: longitude(lon)
, latitude(lat)
{
}
GeoPoint(double lon, double lat, double alt)
: longitude(lon)
, latitude(lat)
, altitude(alt)
{
}

double longitude = get_nan();
double latitude = get_nan();
double altitude = get_nan();
Expand Down Expand Up @@ -117,32 +104,6 @@ struct GeoBox {
// - Any interior ring must be entirely contained by the outer ring.
// - Interior rings cannot intersect or overlap each other. Interior rings cannot share an edge.
struct GeoPolygon {
GeoPolygon(std::vector<GeoPoint>&& p)
: points({std::move(p)})
{
}
GeoPolygon(const std::vector<GeoPoint>& p)
: points({p})
{
}
GeoPolygon(std::vector<std::vector<GeoPoint>>&& p)
: points(std::move(p))
{
}
GeoPolygon(const std::vector<std::vector<GeoPoint>>& p)
: points(p)
{
}
GeoPolygon(const GeoPolygon& other) = default;
GeoPolygon(GeoPolygon&& other) = default;
GeoPolygon& operator=(const GeoPolygon& other) = default;
GeoPolygon& operator=(GeoPolygon&& other) = default;
GeoPolygon& operator=(std::initializer_list<std::vector<GeoPoint>>&& p)
{
points = std::move(p);
return *this;
}

bool operator==(const GeoPolygon& other) const
{
return points == other.points;
Expand Down
Loading
0