-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Geo Spatial: 1. geography common #2954
Conversation
f0d2ce3
to
27a3283
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start.
Codecov Report
@@ Coverage Diff @@
## master #2954 +/- ##
==========================================
- Coverage 85.47% 84.42% -1.06%
==========================================
Files 1229 1273 +44
Lines 110375 112914 +2539
==========================================
+ Hits 94341 95323 +982
- Misses 16034 17591 +1557
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM, good job, see the comments inline.
src/common/geo/io/Geometry.h
Outdated
Coordinate coord; | ||
|
||
explicit Point(const Coordinate &v) : coord(v) {} | ||
explicit Point(Coordinate &&v) : coord(std::move(v)) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually, if you define copy/move constructor, consider provide copy/move assignment as well
Check these class in Geometry.h
06f0998
to
a3d8297
Compare
868139a
to
36255ec
Compare
303e4b3
to
ad28e3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
auto* c1 = reinterpret_cast<const char*>(&val); | ||
auto i = *reinterpret_cast<const int64_t*>(c1); | ||
i = -(std::numeric_limits<int64_t>::max() + i); | ||
val = *reinterpret_cast<const double*>(&i); | ||
auto* c2 = reinterpret_cast<const char*>(&i); | ||
val = *reinterpret_cast<const double*>(c2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explain it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find nebula has configured the option:
option(ENABLE_STRICT_ALIASING "Build with -fstrict-aliasing" OFF)
if(NOT ENABLE_STRICT_ALIASING)
add_compile_options(-fno-strict-aliasing)
else()
add_compile_options(-fstrict-aliasing)
endif()
I don't know why this option doesn't work now
3345892
to
72c89f0
Compare
This reverts commit 2c3e790.
This pr has done the followings:
Some extra notes:
Our macro MUST_USE_RESULT conflicts with s2's third-party's macro, so I change it to NG_MUST_USE_RESULT