-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Xcode: Enabled -Wimplicit-fallthrough * CompilerSupport / PlatformCompat overhaul - Removed obsolete/unused MUST_USE_RESULT - Changed LITECORE_UNUSED to be the standard C++17 [[maybe_unused]] and commented that we should stop using the macro - Added LIFETIMEBOUND Removed LITECORE_UNUSED, FLEECE_UNUSED Replaced with standard [[maybe_unused]] * Use LIFETIMEBOUND in API Some slice code cleanup, removing C++11/C++14 shims - Added `data()` and `size_bytes()` methods to slice types, like those in std::span. (Can't add `size()` because it conflicts with a data member.) This is an incremental step toward moving to `span`, or at least making the `buf` and `size` fields private. - Likewise, added `data()`, `size_bytes()` to FLSlice and FLSliceResult, as well as `empty()` and `operator bool`. - Removed obsolete `sliceHash`. - Removed conditional support for `std::string_view`, unnecessary since we require C++17. - Removed `constexpr14` which was only useful when we supported C++11. - Added default initializers to slice member variables instead of initializing in the default constructor. - Use `= default` for default constructors. * C++ improvements to Fleece.hh - Make Value, Array, Dict trivially copyable: this allows instances to be passed in a register instead of on the stack in some ABIs, such as ARM64, which is more efficient. (The fix is to remove the custom operator= methods, which are unnecessary.) - Made operator==, operator!= methods const. - Made move constructors/assignment `noexcept`, which helps collections generate more optimal code. - Don't pass `alloc_slice` or `string` by value. * Removed unnecessary #include <algorithm> from RefCounted.hh --------- Co-authored-by: Jianmin Zhao <[email protected]>
- Loading branch information
1 parent
aea5c0c
commit 170d717
Showing
26 changed files
with
224 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.