Commit 6a59781
authored
Use C++'s smart pointers std::unique_ptr and std::shared_ptr instead of our own. (#1365)
* Remove headers from CMake file.
* Find-and-replace change.
* Format code.
* Find and replace for std::atomic.
* Format code.
* Update to Dec 2022 release of boringssl.
In this release, the "src" directory is removed from boringssl,
so there are some CMake and patch changes necessary for compatibility.
* Re-add patch file.
* Switch to std::make_unique.
* Fix make_shared, std::move, and class initialization.
* WIP.
* Fix more move syntax.
* Fix more std::move issues.
Revert Firestore.
* Remove debug output
* Fix Android Firestore test, and Storage assignment.
* Make the callback safer via shared_ptr.
* Fix lint errors.
* Format code.
* More lint fixes.
* More lint.
* Additional lint warning fixes.
* Fix Firestore test.
* Fix more lints.
* Lint lint lint.
* Change RequestDataPtr to a unique_ptr since STLPort is no longer used.
* Remove Move() and Forward(), replacing with std::move() and std::foward<>().
* Format code and lint fixes.
* Change firebase::Move explicitly to std::move.
* Remove lint warnings for headers.
* More lint warnings on includes.
* Format code.
* Return back to shared pointer.
* Add note about NewCallback and link to TODO.
* Fix lint error.
* Fix a lingering firebase::Move.
* Fix optional_test to mock Move correctly again.
* Revert prereqs script, python3 change will be made elsewhere.
* Lint.
* Remove references to atomic_test.
* Fix Move -> std::move once more
* Fix a seg fault race condition on Linux by using a unique_ptr.
This code always wanted to use a unique_ptr, but was previously
using a SharedPtr because of STLPort.
However, even without STLPort, there is still an issue switching
it to a unique_ptr, which is that std::priority_queue is misdesigned
and does not return a mutable reference in C++14.
Because of this, if we want to std::move from a priority queue,
we need to do a const cast.
* Empty commit.
* Fix test error.
* Fix test compilation error.
* Fix additional test build error.
* Vector initializer lists use copy semantics. Switch to push_back since these are just tests.
* Fix Forward --> std::forward from the merged Firestore change.
* Add callback tests for shared_ptr wrapping a unique_ptr.1 parent 2506fd9 commit 6a59781
File tree
167 files changed
+867
-1877
lines changed- app_check
- src
- desktop
- ios
- app
- memory
- meta
- rest/tests
- src
- heartbeat
- secure
- tests
- secure
- auth
- src/desktop
- tests/desktop
- database
- src
- desktop
- connection
- core
- persistence
- view
- ios
- tests/desktop
- core
- persistence
- test
- view
- firestore
- integration_test_internal/src
- android
- jni
- src
- android
- common
- jni
- functions/src/ios
- installations/src/ios
- messaging
- remote_config
- src
- android
- desktop
- ios
- storage/src
- desktop
- ios
- testing
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
167 files changed
+867
-1877
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | 354 | | |
359 | 355 | | |
360 | 356 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments