51
51
#include " app/src/cleanup_notifier.h"
52
52
#include " app/src/log.h"
53
53
#include " app/src/include/firebase/internal/mutex.h"
54
- #include " app/memory/shared_ptr.h"
55
54
#include " app/src/cpp_instance_manager.h"
56
55
#include " auth/src/include/firebase/auth.h"
57
56
57
+ #include < assert.h>
58
+
58
59
#include < stdexcept>
59
60
#include < algorithm>
60
-
61
- #include < assert.h >
61
+ # include < memory >
62
+ #include < utility >
62
63
%}
63
64
64
65
%import " app/src/swig/app.i"
@@ -116,7 +117,7 @@ class AuthNotifier {
116
117
AuthStateChangedDelegateFunc state_changed_delegate) {
117
118
assert (auth);
118
119
assert (state_changed_delegate);
119
- data_ = ::firebase::MakeShared <CallbackData>();
120
+ data_ = std::make_shared <CallbackData>();
120
121
data_->app = &auth->app ();
121
122
data_->state_changed_delegate = state_changed_delegate;
122
123
data_->callback_reference = nullptr ;
@@ -156,13 +157,13 @@ class AuthNotifier {
156
157
if (!data_) return ;
157
158
158
159
data_->callback_reference = firebase::callback::AddCallback (
159
- new firebase::callback::CallbackValue1<::firebase::SharedPtr <CallbackData>>(
160
+ new firebase::callback::CallbackValue1<std::shared_ptr <CallbackData>>(
160
161
data_, NotifyOnTheMainThread));
161
162
}
162
163
163
164
private:
164
165
// Thunk which converts from the current calling convention to SWIGSTDCALL.
165
- static void NotifyOnTheMainThread (::firebase::SharedPtr <CallbackData> data) {
166
+ static void NotifyOnTheMainThread (std::shared_ptr <CallbackData> data) {
166
167
{
167
168
::firebase::MutexLock lock (g_auth_notifier_mutex);
168
169
if (!data->callback_reference ) return ;
@@ -172,7 +173,7 @@ class AuthNotifier {
172
173
}
173
174
174
175
private:
175
- ::firebase::SharedPtr <CallbackData> data_;
176
+ std::shared_ptr <CallbackData> data_;
176
177
};
177
178
178
179
// Generate a Auth listener implementation and the methods to instance it.
0 commit comments