Skip to content

Commit 0827dad

Browse files
chkuang-ga-maurice
authored andcommitted
Change std:unique_ptr to UniquePtr
This is causing Rapid build fail with error message like "error: no template named 'make_unique' in namespace 'std'; did you mean 'MakeUnique'?" Since we have our own implementation, we should use it consistently. PiperOrigin-RevId: 320681249
1 parent 32ee577 commit 0827dad

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

database/src/desktop/database_desktop.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ void DatabaseInternal::UnregisterAllChildListeners(
287287
void DatabaseInternal::EnsureRepo() {
288288
MutexLock lock(repo_mutex_);
289289
if (!repo_) {
290-
repo_ = std::make_unique<Repo>(app_, this, database_url_.c_str(), &logger_,
291-
persistence_enabled_);
290+
repo_ = MakeUnique<Repo>(app_, this, database_url_.c_str(), &logger_,
291+
persistence_enabled_);
292292
}
293293
}
294294

database/src/desktop/database_desktop.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "app/src/mutex.h"
2727
#include "app/src/safe_reference.h"
2828
#include "app/src/scheduler.h"
29+
#include "app/memory/unique_ptr.h"
2930
#include "database/src/common/listener.h"
3031
#include "database/src/common/query_spec.h"
3132
#include "database/src/desktop/connection/host_info.h"
@@ -208,7 +209,7 @@ class DatabaseInternal {
208209

209210
Mutex repo_mutex_;
210211
// The local copy of the repository, for offline support and local caching.
211-
std::unique_ptr<Repo> repo_;
212+
UniquePtr<Repo> repo_;
212213
};
213214

214215
} // namespace internal

0 commit comments

Comments
 (0)