From 68b0ec6487186d59b1ec1dfcbc85673fc452bc4a Mon Sep 17 00:00:00 2001 From: Justin Yun Date: Wed, 16 Aug 2017 18:54:20 +0900 Subject: [PATCH] gatekeeperd: use std::unique_ptr std::unique_ptr is available in this scope. Substitue the UniquePtr to std::unique_ptr. Bug: 63686260 Test: build and boot Change-Id: Ib8ea3fb5c49c0e92d962f65f1139b073168f8698 --- gatekeeperd/SoftGateKeeper.h | 4 ++-- gatekeeperd/SoftGateKeeperDevice.h | 4 ++-- gatekeeperd/gatekeeperd.cpp | 3 ++- gatekeeperd/tests/gatekeeper_test.cpp | 1 - 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gatekeeperd/SoftGateKeeper.h b/gatekeeperd/SoftGateKeeper.h index 92d175290..2f4f4d7e6 100644 --- a/gatekeeperd/SoftGateKeeper.h +++ b/gatekeeperd/SoftGateKeeper.h @@ -27,10 +27,10 @@ extern "C" { #include #include -#include #include #include +#include namespace gatekeeper { @@ -173,7 +173,7 @@ private: typedef std::unordered_map FailureRecordMap; typedef std::unordered_map FastHashMap; - UniquePtr key_; + std::unique_ptr key_; FailureRecordMap failure_map_; FastHashMap fast_hash_map_; }; diff --git a/gatekeeperd/SoftGateKeeperDevice.h b/gatekeeperd/SoftGateKeeperDevice.h index 229f9a9e6..e3dc068fb 100644 --- a/gatekeeperd/SoftGateKeeperDevice.h +++ b/gatekeeperd/SoftGateKeeperDevice.h @@ -19,7 +19,7 @@ #include "SoftGateKeeper.h" -#include +#include using namespace gatekeeper; @@ -68,7 +68,7 @@ public: const uint8_t *provided_password, uint32_t provided_password_length, uint8_t **auth_token, uint32_t *auth_token_length, bool *request_reenroll); private: - UniquePtr impl_; + std::unique_ptr impl_; }; } // namespace gatekeeper diff --git a/gatekeeperd/gatekeeperd.cpp b/gatekeeperd/gatekeeperd.cpp index 184c6d222..61c880409 100644 --- a/gatekeeperd/gatekeeperd.cpp +++ b/gatekeeperd/gatekeeperd.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -383,7 +384,7 @@ public: private: sp hw_device; - UniquePtr soft_device; + std::unique_ptr soft_device; bool clear_state_if_needed_done; }; diff --git a/gatekeeperd/tests/gatekeeper_test.cpp b/gatekeeperd/tests/gatekeeper_test.cpp index b3aea7b5d..100375fb8 100644 --- a/gatekeeperd/tests/gatekeeper_test.cpp +++ b/gatekeeperd/tests/gatekeeper_test.cpp @@ -19,7 +19,6 @@ #include #include -#include #include "../SoftGateKeeper.h"