diff --git a/garnet/bin/inspect_unittests/vmo_reader_unittest.cc b/garnet/bin/inspect_unittests/vmo_reader_unittest.cc index 0421eac7301b7b5f63e9acb1bdad86b520be7460..7ff70a8f5158a8f7ce2adbea04c1c0eb899aa928 100644 --- a/garnet/bin/inspect_unittests/vmo_reader_unittest.cc +++ b/garnet/bin/inspect_unittests/vmo_reader_unittest.cc @@ -23,7 +23,7 @@ using namespace inspect::testing; namespace { TEST(VmoReader, CreateAndReadObjectHierarchy) { - auto inspector = fbl::make_unique<inspect::vmo::Inspector>(); + auto inspector = std::make_unique<inspect::vmo::Inspector>(); ASSERT_TRUE(inspector); Object object = inspector->CreateObject("objects"); diff --git a/garnet/drivers/usb_video/camera_control_impl.cpp b/garnet/drivers/usb_video/camera_control_impl.cpp index 7d2919d2ad13aeecd6145eae095b675ca1506add..be090de6ebbeb5d927981edc76c3cf74f6576fe8 100644 --- a/garnet/drivers/usb_video/camera_control_impl.cpp +++ b/garnet/drivers/usb_video/camera_control_impl.cpp @@ -76,7 +76,7 @@ void ControlImpl::CreateStream( return; } - stream_ = fbl::make_unique<StreamImpl>(*this, std::move(stream), + stream_ = std::make_unique<StreamImpl>(*this, std::move(stream), std::move(stream_token)); } diff --git a/garnet/drivers/usb_video/usb-video-stream.cpp b/garnet/drivers/usb_video/usb-video-stream.cpp index 10843f496dad6139bcbbbf00d2dcd03c43abea15..33b197e461622ad3a2f7eb3eabf3100fa84ee5f1 100644 --- a/garnet/drivers/usb_video/usb-video-stream.cpp +++ b/garnet/drivers/usb_video/usb-video-stream.cpp @@ -51,7 +51,7 @@ UsbVideoStream::UsbVideoStream(zx_device_t* parent, usb_protocol_t* usb, device_info_(std::move(device_info)) { if (fidl_dispatch_loop_ == nullptr) { fidl_dispatch_loop_ = - fbl::make_unique<async::Loop>(&kAsyncLoopConfigNoAttachToThread); + std::make_unique<async::Loop>(&kAsyncLoopConfigNoAttachToThread); fidl_dispatch_loop_->StartThread(); } } @@ -293,7 +293,7 @@ zx_status_t UsbVideoStream::GetChannel(zx_handle_t handle) { return ZX_ERR_INVALID_ARGS; } fidl::InterfaceRequest<fuchsia::camera::Control> control_interface(std::move(channel)); - camera_control_ = fbl::make_unique<camera::ControlImpl>( + camera_control_ = std::make_unique<camera::ControlImpl>( this, std::move(control_interface), fidl_dispatch_loop_->dispatcher(), [this] { fbl::AutoLock lock(&lock_); diff --git a/src/connectivity/wlan/drivers/wlan/tests/minstrel_unittest.cpp b/src/connectivity/wlan/drivers/wlan/tests/minstrel_unittest.cpp index 8adf2fe4b0b121326db9ce2a7efed7b5ea077b34..b3c373f31600283d411631c5684caa4db6a9ae96 100644 --- a/src/connectivity/wlan/drivers/wlan/tests/minstrel_unittest.cpp +++ b/src/connectivity/wlan/drivers/wlan/tests/minstrel_unittest.cpp @@ -34,7 +34,7 @@ static const uint8_t kBasicRateBit = 0b10000000; struct MinstrelTest : public ::testing::Test { MinstrelTest() - : minstrel_(MinstrelRateSelector(fbl::make_unique<TestTimer>(0, &clock), + : minstrel_(MinstrelRateSelector(std::make_unique<TestTimer>(0, &clock), ProbeSequence(SequentialTable()), zx::msec(100))) { kTestMacAddr.CopyTo(assoc_ctx_ht_.bssid); } diff --git a/src/connectivity/wlan/lib/mlme/cpp/ap/ap_mlme.cpp b/src/connectivity/wlan/lib/mlme/cpp/ap/ap_mlme.cpp index 471accb62046f2d5413097d2f7da7695c6aaf063..5f1da65fbc3191547cdf2b770f966ef9ce4aca3f 100644 --- a/src/connectivity/wlan/lib/mlme/cpp/ap/ap_mlme.cpp +++ b/src/connectivity/wlan/lib/mlme/cpp/ap/ap_mlme.cpp @@ -87,7 +87,7 @@ zx_status_t ApMlme::HandleMlmeStartReq(const MlmeMsg<wlan_mlme::StartRequest>& r device_->ConfigureBss(&cfg); // Create and start BSS. - auto bcn_sender = fbl::make_unique<BeaconSender>(device_); + auto bcn_sender = std::make_unique<BeaconSender>(device_); bss_.reset(new InfraBss(device_, std::move(bcn_sender), bssid, std::move(timer))); bss_->Start(req); diff --git a/src/connectivity/wlan/lib/mlme/cpp/ap/infra_bss.cpp b/src/connectivity/wlan/lib/mlme/cpp/ap/infra_bss.cpp index d2a54e875be6e4f2ac56e0d158ae63fee4fd5a33..381de1f86cc42849f0c36d70b2686c2572e87644 100644 --- a/src/connectivity/wlan/lib/mlme/cpp/ap/infra_bss.cpp +++ b/src/connectivity/wlan/lib/mlme/cpp/ap/infra_bss.cpp @@ -262,7 +262,7 @@ void InfraBss::HandleNewClientAuthAttempt(const MgmtFrameView<Authentication>& f client_addr.ToString().c_str()); // Else, create a new remote client instance. - auto client = fbl::make_unique<RemoteClient>(device_, + auto client = std::make_unique<RemoteClient>(device_, this, // bss this, // client listener client_addr); diff --git a/src/connectivity/wlan/lib/mlme/cpp/ap/remote_client.cpp b/src/connectivity/wlan/lib/mlme/cpp/ap/remote_client.cpp index b46433e72e6a3b0ad019263577a50c8cabcb3adb..9298913b9c005fe3b26ae6c6ef698f872a69e498 100644 --- a/src/connectivity/wlan/lib/mlme/cpp/ap/remote_client.cpp +++ b/src/connectivity/wlan/lib/mlme/cpp/ap/remote_client.cpp @@ -26,7 +26,7 @@ namespace wlan_mlme = ::fuchsia::wlan::mlme; template <typename S, typename... Args> void BaseState::MoveToState(Args&&... args) { static_assert(std::is_base_of<BaseState, S>::value, "State class must implement BaseState"); - client_->MoveToState(fbl::make_unique<S>(client_, std::forward<Args>(args)...)); + client_->MoveToState(std::make_unique<S>(client_, std::forward<Args>(args)...)); } // Deauthenticating implementation. @@ -705,7 +705,7 @@ RemoteClient::RemoteClient(DeviceInterface* device, BssInterface* bss, debugbss("[client] [%s] spawned\n", addr_.ToString().c_str()); MoveToState( - fbl::make_unique<DeauthenticatedState>(this, DeauthenticatedState::MoveReason::INIT)); + std::make_unique<DeauthenticatedState>(this, DeauthenticatedState::MoveReason::INIT)); } RemoteClient::~RemoteClient() { diff --git a/src/connectivity/wlan/lib/mlme/cpp/client/client_factory.cpp b/src/connectivity/wlan/lib/mlme/cpp/client/client_factory.cpp index f96a35b687816386aa1a835859f228ea5fb164c4..5ee70634766674d7facaf3cd9272910b84b77485 100644 --- a/src/connectivity/wlan/lib/mlme/cpp/client/client_factory.cpp +++ b/src/connectivity/wlan/lib/mlme/cpp/client/client_factory.cpp @@ -21,7 +21,7 @@ fbl::unique_ptr<ClientInterface> CreateDefaultClient(DeviceInterface* device, Jo errorf("could not create STA timer: %d\n", status); return nullptr; } - return fbl::make_unique<Station>(device, TimerManager<>(std::move(timer)), chan_scheduler, + return std::make_unique<Station>(device, TimerManager<>(std::move(timer)), chan_scheduler, join_ctx); } diff --git a/src/connectivity/wlan/lib/mlme/cpp/packet.cpp b/src/connectivity/wlan/lib/mlme/cpp/packet.cpp index 51d349d4f344b49306cd4394b687ac2219a512d4..3f924f49c76f6ddd91490b14c31dad4a20652ed8 100644 --- a/src/connectivity/wlan/lib/mlme/cpp/packet.cpp +++ b/src/connectivity/wlan/lib/mlme/cpp/packet.cpp @@ -103,7 +103,7 @@ fbl::unique_ptr<Buffer> GetBuffer(size_t len) { fbl::unique_ptr<Packet> GetPacket(size_t len, Packet::Peer peer) { auto buffer = GetBuffer(len); if (buffer == nullptr) { return nullptr; } - auto packet = fbl::make_unique<Packet>(std::move(buffer), len); + auto packet = std::make_unique<Packet>(std::move(buffer), len); packet->set_peer(peer); return packet; } diff --git a/src/connectivity/wlan/lib/mlme/cpp/tests/channel_scheduler_unittest.cpp b/src/connectivity/wlan/lib/mlme/cpp/tests/channel_scheduler_unittest.cpp index 640ab02f3244120612d866e5130f86a08f67f86c..1dbeec808e67af1c2fd30e1fa46235c5cc7d47d3 100644 --- a/src/connectivity/wlan/lib/mlme/cpp/tests/channel_scheduler_unittest.cpp +++ b/src/connectivity/wlan/lib/mlme/cpp/tests/channel_scheduler_unittest.cpp @@ -57,7 +57,7 @@ struct MockOffChannelHandler : OffChannelHandler { }; TEST_F(ChannelSchedulerTest, OnChannelFrame) { - chan_sched_.HandleIncomingFrame(fbl::make_unique<Packet>(GetBuffer(10), 10)); + chan_sched_.HandleIncomingFrame(std::make_unique<Packet>(GetBuffer(10), 10)); EXPECT_EQ("frame_on,", str_); } @@ -70,7 +70,7 @@ TEST_F(ChannelSchedulerTest, RequestOffChannelTime) { EXPECT_EQ(7u, device_.GetChannelNumber()); str_.clear(); - chan_sched_.HandleIncomingFrame(fbl::make_unique<Packet>(GetBuffer(10), 10)); + chan_sched_.HandleIncomingFrame(std::make_unique<Packet>(GetBuffer(10), 10)); EXPECT_EQ("frame_off,", str_); str_.clear(); diff --git a/src/connectivity/wlan/lib/mlme/cpp/tests/frame_validation_unittest.cpp b/src/connectivity/wlan/lib/mlme/cpp/tests/frame_validation_unittest.cpp index a20aad6b895a4ad3b3ab84501a3ed91d24f0d905..d28765d60427cc8e92648055963a5e6c7dbc5dd2 100644 --- a/src/connectivity/wlan/lib/mlme/cpp/tests/frame_validation_unittest.cpp +++ b/src/connectivity/wlan/lib/mlme/cpp/tests/frame_validation_unittest.cpp @@ -48,7 +48,7 @@ struct DynamicTestHdr { static fbl::unique_ptr<Packet> GetPacket(size_t len) { auto buffer = GetBuffer(len); - auto pkt = fbl::make_unique<Packet>(std::move(buffer), len); + auto pkt = std::make_unique<Packet>(std::move(buffer), len); pkt->clear(); return pkt; } diff --git a/src/connectivity/wlan/lib/mlme/cpp/tests/hwmp_unittest.cpp b/src/connectivity/wlan/lib/mlme/cpp/tests/hwmp_unittest.cpp index 0b5fadc45e3ed2a095e1eeda3436837aa08e0ad1..d5b9b40b8a28234c72ff35b69ddc7177deed4717 100644 --- a/src/connectivity/wlan/lib/mlme/cpp/tests/hwmp_unittest.cpp +++ b/src/connectivity/wlan/lib/mlme/cpp/tests/hwmp_unittest.cpp @@ -31,7 +31,7 @@ TEST(Hwmp, HwmpSeqnoLessThan) { } struct HwmpTest : public ::testing::Test { - HwmpTest() : state(fbl::make_unique<TestTimer>(123, &clock)) { clock.Set(zx::time(1000)); } + HwmpTest() : state(std::make_unique<TestTimer>(123, &clock)) { clock.Set(zx::time(1000)); } MacHeaderWriter CreateMacHeaderWriter() { return MacHeaderWriter(self_addr(), seq_mgr.get()); } diff --git a/src/connectivity/wlan/lib/mlme/cpp/tests/mac_frame_unittest.cpp b/src/connectivity/wlan/lib/mlme/cpp/tests/mac_frame_unittest.cpp index 612de871812ab3730b09ed9180da87c2a6f4860d..66d649cf5d79f078063f93be0dbaa596f93dcfbf 100644 --- a/src/connectivity/wlan/lib/mlme/cpp/tests/mac_frame_unittest.cpp +++ b/src/connectivity/wlan/lib/mlme/cpp/tests/mac_frame_unittest.cpp @@ -75,7 +75,7 @@ template <size_t padding_len, size_t payload_len> struct TripleHdrFrame { static fbl::unique_ptr<Packet> GetPacket(size_t len) { auto buffer = GetBuffer(len); memset(buffer->data(), 0, len); - return fbl::make_unique<Packet>(std::move(buffer), len); + return std::make_unique<Packet>(std::move(buffer), len); } using DefaultTripleHdrFrame = TripleHdrFrame<0, 10>; diff --git a/src/connectivity/wlan/lib/mlme/cpp/tests/mock_device.h b/src/connectivity/wlan/lib/mlme/cpp/tests/mock_device.h index d109a26e6fdd3f13f8688807c61757f30998190a..e3e56b861e897193428e62785662274592414490 100644 --- a/src/connectivity/wlan/lib/mlme/cpp/tests/mock_device.h +++ b/src/connectivity/wlan/lib/mlme/cpp/tests/mock_device.h @@ -65,7 +65,7 @@ struct MockDevice : public DeviceInterface { } fbl::unique_ptr<Timer> CreateTimer(uint64_t id) { - return fbl::make_unique<TestTimer>(id, &clock_); + return std::make_unique<TestTimer>(id, &clock_); } zx_status_t DeliverEthernet(Span<const uint8_t> eth_frame) override final { diff --git a/src/connectivity/wlan/lib/mlme/cpp/tests/scanner_unittest.cpp b/src/connectivity/wlan/lib/mlme/cpp/tests/scanner_unittest.cpp index 04af27ec5ba405fd85c8d6706566725fe795f758..39a5f98f4dcd834db8d4d7b096e2a78ae64a4aaf 100644 --- a/src/connectivity/wlan/lib/mlme/cpp/tests/scanner_unittest.cpp +++ b/src/connectivity/wlan/lib/mlme/cpp/tests/scanner_unittest.cpp @@ -82,7 +82,7 @@ class ScannerTest : public ::testing::Test { info.snr_dbh = 30; auto buffer = GetBuffer(data.size()); - auto packet = fbl::make_unique<Packet>(std::move(buffer), data.size()); + auto packet = std::make_unique<Packet>(std::move(buffer), data.size()); packet->CopyCtrlFrom(info); memcpy(packet->mut_field<uint8_t*>(0), data.data(), data.size()); return packet; diff --git a/src/connectivity/wlan/lib/mlme/cpp/tests/timer_manager_unittest.cpp b/src/connectivity/wlan/lib/mlme/cpp/tests/timer_manager_unittest.cpp index 71a4a4eaef1c414b062b9a276d379c524daf8cb7..895b3f2b80ed6267a4cc013fdc47bde3019b5d2d 100644 --- a/src/connectivity/wlan/lib/mlme/cpp/tests/timer_manager_unittest.cpp +++ b/src/connectivity/wlan/lib/mlme/cpp/tests/timer_manager_unittest.cpp @@ -43,9 +43,9 @@ class MockedTimer : public Timer { struct TimerManagerTest : public ::testing::Test { TimerManagerTest() { - auto timer_box = fbl::make_unique<MockedTimer>(); + auto timer_box = std::make_unique<MockedTimer>(); timer = timer_box.get(); - timer_manager = fbl::make_unique<TimerManager<std::string>>(std::move(timer_box)); + timer_manager = std::make_unique<TimerManager<std::string>>(std::move(timer_box)); } timekeeper::TestClock* clock() { return &timer->clock; } diff --git a/src/media/playback/mediaplayer/graph/payloads/vmo_payload_allocator.cc b/src/media/playback/mediaplayer/graph/payloads/vmo_payload_allocator.cc index 26c4b08814ed483eb229b2b9b207a58c8f13ea0c..f8fe3efd1c96c26896be8ccb97fb2d2cb877ff32 100644 --- a/src/media/playback/mediaplayer/graph/payloads/vmo_payload_allocator.cc +++ b/src/media/playback/mediaplayer/graph/payloads/vmo_payload_allocator.cc @@ -86,7 +86,7 @@ void VmoPayloadAllocator::AddVmo(fbl::RefPtr<PayloadVmo> payload_vmo) { payload_vmos_.push_back(payload_vmo); if (vmo_allocation_ != VmoAllocation::kVmoPerBuffer) { payload_vmo->allocator_ = - fbl::make_unique<FifoAllocator>(payload_vmo->size()); + std::make_unique<FifoAllocator>(payload_vmo->size()); } } diff --git a/zircon/system/core/bootsvc/main.cpp b/zircon/system/core/bootsvc/main.cpp index 1029e27188f764bb6de605f48775398c54db8ada..9a9765926923f5b05c3fad30bed35c8be60a1799 100644 --- a/zircon/system/core/bootsvc/main.cpp +++ b/zircon/system/core/bootsvc/main.cpp @@ -170,7 +170,7 @@ int LaunchNextProcess(void* raw_ctx) { void StartLaunchNextProcessThread(const fbl::RefPtr<bootsvc::BootfsService>& bootfs, const fbl::RefPtr<bootsvc::SvcfsService>& svcfs) { - auto args = fbl::make_unique<LaunchNextProcessArgs>(); + auto args = std::make_unique<LaunchNextProcessArgs>(); args->bootfs = bootfs; args->svcfs = svcfs; diff --git a/zircon/system/core/bootsvc/util.cpp b/zircon/system/core/bootsvc/util.cpp index 36fe0442f6cfc7bfd4bd3684f4ec29c956ad18c5..e3d4a7506515b090a4b380bfee1a33d87b1b5f07 100644 --- a/zircon/system/core/bootsvc/util.cpp +++ b/zircon/system/core/bootsvc/util.cpp @@ -164,7 +164,7 @@ zx_status_t CreateVnodeConnection(fs::Vfs* vfs, fbl::RefPtr<fs::Vnode> vnode, zx return status; } - auto conn = fbl::make_unique<fs::Connection>(vfs, vnode, std::move(local), + auto conn = std::make_unique<fs::Connection>(vfs, vnode, std::move(local), ZX_FS_FLAG_DIRECTORY | ZX_FS_RIGHT_READABLE | ZX_FS_RIGHT_WRITABLE); diff --git a/zircon/system/core/devmgr/devcoordinator/coordinator.cpp b/zircon/system/core/devmgr/devcoordinator/coordinator.cpp index c60f4dbd8181e490e1cf1c03741391b04142d558..c9202eeef0c30a24488a4e900cc3a917e4d84c1a 100644 --- a/zircon/system/core/devmgr/devcoordinator/coordinator.cpp +++ b/zircon/system/core/devmgr/devcoordinator/coordinator.cpp @@ -568,7 +568,7 @@ static zx_status_t dc_launch_devhost(Devhost* host, DevhostLoaderService* loader } zx_status_t Coordinator::NewDevhost(const char* name, Devhost* parent, Devhost** out) { - auto dh = fbl::make_unique<Devhost>(); + auto dh = std::make_unique<Devhost>(); if (dh == nullptr) { return ZX_ERR_NO_MEMORY; } diff --git a/zircon/system/core/devmgr/devcoordinator/devfs.cpp b/zircon/system/core/devmgr/devcoordinator/devfs.cpp index 832970f835d6812b74abc5753ad3d6bb85f3bdb2..c7270bb95464d5d28672df578642baef516480c4 100644 --- a/zircon/system/core/devmgr/devcoordinator/devfs.cpp +++ b/zircon/system/core/devmgr/devcoordinator/devfs.cpp @@ -268,7 +268,7 @@ void devfs_notify(Devnode* dn, const fbl::String& name, unsigned op) { } // namespace zx_status_t devfs_watch(Devnode* dn, zx::channel h, uint32_t mask) { - auto watcher = fbl::make_unique<Watcher>(dn, std::move(h), mask); + auto watcher = std::make_unique<Watcher>(dn, std::move(h), mask); if (watcher == nullptr) { return ZX_ERR_NO_MEMORY; } @@ -297,7 +297,7 @@ zx_status_t devfs_watch(Devnode* dn, zx::channel h, uint32_t mask) { namespace { fbl::unique_ptr<Devnode> devfs_mknode(const fbl::RefPtr<Device>& dev, const fbl::String& name) { - auto dn = fbl::make_unique<Devnode>(name); + auto dn = std::make_unique<Devnode>(name); if (!dn) { return nullptr; } @@ -555,7 +555,7 @@ void DcIostate::DetachFromDevnode() { } zx_status_t DcIostate::Create(Devnode* dn, async_dispatcher_t* dispatcher, zx::channel* ipc) { - auto ios = fbl::make_unique<DcIostate>(dn); + auto ios = std::make_unique<DcIostate>(dn); if (ios == nullptr) { return ZX_ERR_NO_MEMORY; } @@ -850,7 +850,7 @@ zx::channel devfs_root_clone() { } void devfs_init(const fbl::RefPtr<Device>& device, async_dispatcher_t* dispatcher) { - root_devnode = fbl::make_unique<Devnode>(""); + root_devnode = std::make_unique<Devnode>(""); if (!root_devnode) { printf("devcoordinator: failed to allocate devfs root node\n"); return; diff --git a/zircon/system/core/devmgr/devcoordinator/driver.cpp b/zircon/system/core/devmgr/devcoordinator/driver.cpp index aef0ad6ddf584264498cedacac021d618c1454fd..41e5e5e8d33e0407cb0d616f1bdefa0b642520ce 100644 --- a/zircon/system/core/devmgr/devcoordinator/driver.cpp +++ b/zircon/system/core/devmgr/devcoordinator/driver.cpp @@ -45,12 +45,12 @@ void found_driver(zircon_driver_note_payload_t* note, const zx_bind_inst_t* bi, return; } - auto drv = fbl::make_unique<devmgr::Driver>(); + auto drv = std::make_unique<devmgr::Driver>(); if (drv == nullptr) { return; } - auto binding = fbl::make_unique<zx_bind_inst_t[]>(note->bindcount); + auto binding = std::make_unique<zx_bind_inst_t[]>(note->bindcount); if (binding == nullptr) { return; } diff --git a/zircon/system/core/devmgr/devcoordinator/fidl-proxy.cpp b/zircon/system/core/devmgr/devcoordinator/fidl-proxy.cpp index 249fc89bb44f5a2f532eb2a870778c70763c125b..bfb711b6ee09260574ec0f9be907bedb004527b9 100644 --- a/zircon/system/core/devmgr/devcoordinator/fidl-proxy.cpp +++ b/zircon/system/core/devmgr/devcoordinator/fidl-proxy.cpp @@ -10,7 +10,7 @@ namespace devmgr { zx_status_t FidlProxyHandler::Create(Coordinator* coordinator, async_dispatcher_t* dispatcher, zx::channel proxy_channel) { - auto handler = fbl::make_unique<FidlProxyHandler>(coordinator); + auto handler = std::make_unique<FidlProxyHandler>(coordinator); if (handler == nullptr) { return ZX_ERR_NO_MEMORY; } diff --git a/zircon/system/core/devmgr/devhost/devhost.cpp b/zircon/system/core/devmgr/devhost/devhost.cpp index fbdca3e55a24ba6b3799a9c8c8e320fb1b8873ee..7b6fe1a84905e27819844578a0086d30b8e1a649 100644 --- a/zircon/system/core/devmgr/devhost/devhost.cpp +++ b/zircon/system/core/devmgr/devhost/devhost.cpp @@ -88,7 +88,7 @@ async::Loop* DevhostAsyncLoop() { } static zx_status_t SetupRootDevcoordinatorConnection(zx::channel ch) { - auto conn = fbl::make_unique<DevhostControllerConnection>(); + auto conn = std::make_unique<DevhostControllerConnection>(); if (conn == nullptr) { return ZX_ERR_NO_MEMORY; } @@ -367,7 +367,7 @@ static zx_status_t fidl_CreateDeviceStub(void* raw_ctx, zx_handle_t raw_rpc, uin zx::channel rpc(raw_rpc); log(RPC_IN, "devhost: create device stub\n"); - auto newconn = fbl::make_unique<DeviceControllerConnection>(); + auto newconn = std::make_unique<DeviceControllerConnection>(); if (!newconn) { return ZX_ERR_NO_MEMORY; } @@ -413,7 +413,7 @@ static zx_status_t fidl_CreateDevice(void* raw_ctx, zx_handle_t raw_rpc, static_cast<int>(driver_path_size), driver_path_data, static_cast<int>(proxy_args_size), proxy_args_data); - auto newconn = fbl::make_unique<DeviceControllerConnection>(); + auto newconn = std::make_unique<DeviceControllerConnection>(); if (!newconn) { return ZX_ERR_NO_MEMORY; } @@ -490,7 +490,7 @@ static zx_status_t fidl_CreateCompositeDevice(void* raw_ctx, zx_handle_t raw_rpc log(RPC_IN, "devhost: create composite device %.*s'\n", static_cast<int>(name_size), name_data); - auto newconn = fbl::make_unique<DeviceControllerConnection>(); + auto newconn = std::make_unique<DeviceControllerConnection>(); if (!newconn) { return fuchsia_device_manager_DevhostControllerCreateCompositeDevice_reply(txn, ZX_ERR_NO_MEMORY); @@ -872,7 +872,7 @@ zx_status_t ProxyIostate::Create(const fbl::RefPtr<zx_device_t>& dev, zx::channe dev->proxy_ios = nullptr; } - auto ios = fbl::make_unique<ProxyIostate>(); + auto ios = std::make_unique<ProxyIostate>(); if (ios == nullptr) { return ZX_ERR_NO_MEMORY; } @@ -925,7 +925,7 @@ static ssize_t devhost_log_write_internal(uint32_t flags, const void* void_data, static thread_local fbl::unique_ptr<Context> ctx; if (ctx == nullptr) { - ctx = fbl::make_unique<Context>(); + ctx = std::make_unique<Context>(); if (ctx == nullptr) { return len; } @@ -1024,7 +1024,7 @@ zx_status_t devhost_add(const fbl::RefPtr<zx_device_t>& parent, bool add_invisible = child->flags & DEV_FLAG_INVISIBLE; - auto conn = fbl::make_unique<DeviceControllerConnection>(); + auto conn = std::make_unique<DeviceControllerConnection>(); if (!conn) { return ZX_ERR_NO_MEMORY; } diff --git a/zircon/system/core/devmgr/devhost/devhost.h b/zircon/system/core/devmgr/devhost/devhost.h index ccc5cedc117b16cd4338e50fe53e26c0e1feb3e7..d4d14edc447914a9b7f57b0130c986959b984fa2 100644 --- a/zircon/system/core/devmgr/devhost/devhost.h +++ b/zircon/system/core/devmgr/devhost/devhost.h @@ -107,7 +107,7 @@ struct zx_driver : fbl::DoublyLinkedListable<fbl::RefPtr<zx_driver>>, fbl::RefCo } private: - friend fbl::unique_ptr<zx_driver> fbl::make_unique<zx_driver>(); + friend fbl::unique_ptr<zx_driver> std::make_unique<zx_driver>(); zx_driver() = default; const char* name_ = nullptr; diff --git a/zircon/system/core/devmgr/devhost/rpc-server.cpp b/zircon/system/core/devmgr/devhost/rpc-server.cpp index 6829ad4dce173a46f0c4168358ffe0a06a391683..99e3f86eb2daf409cb9f973c934fb6a7bd88acb6 100644 --- a/zircon/system/core/devmgr/devhost/rpc-server.cpp +++ b/zircon/system/core/devmgr/devhost/rpc-server.cpp @@ -97,7 +97,7 @@ static zx_status_t devhost_get_handles(zx::channel rh, const fbl::RefPtr<zx_devi bool describe = flags & ZX_FS_FLAG_DESCRIBE; flags &= (~ZX_FS_FLAG_DESCRIBE); - auto newconn = fbl::make_unique<DevfsConnection>(); + auto newconn = std::make_unique<DevfsConnection>(); if (!newconn) { r = ZX_ERR_NO_MEMORY; if (describe) { diff --git a/zircon/system/core/devmgr/dmctl/dmctl.cpp b/zircon/system/core/devmgr/dmctl/dmctl.cpp index ae1b55273599fbb906c217a177a57c3f691542ea..3172c53d6ef83adc00c6e935f46d804283d7b399 100644 --- a/zircon/system/core/devmgr/dmctl/dmctl.cpp +++ b/zircon/system/core/devmgr/dmctl/dmctl.cpp @@ -34,7 +34,7 @@ public: Dmctl::Dmctl(zx_device_t* parent) : DmctlBase(parent) {} zx_status_t Dmctl::Bind(void* ctx, zx_device_t* parent) { - auto dev = fbl::make_unique<Dmctl>(parent); + auto dev = std::make_unique<Dmctl>(parent); auto status = dev->DdkAdd("dmctl"); if (status == ZX_OK) { // devmgr owns the memory now diff --git a/zircon/system/core/devmgr/fshost/main.cpp b/zircon/system/core/devmgr/fshost/main.cpp index 98ab8419d0238577413ff223282162f4412eab88..df3dcd3db84fa44032b59636d9eee348b6a4f3a1 100644 --- a/zircon/system/core/devmgr/fshost/main.cpp +++ b/zircon/system/core/devmgr/fshost/main.cpp @@ -206,7 +206,7 @@ int main(int argc, char** argv) { zx::event fshost_event(zx_take_startup_handle(PA_HND(PA_USER1, 0))); // First, initialize the local filesystem in isolation. - auto root = fbl::make_unique<devmgr::FsManager>(); + auto root = std::make_unique<devmgr::FsManager>(); // Initialize connections to external service managers, and begin // monitoring the |fshost_event| for a termination event. diff --git a/zircon/system/core/devmgr/fshost/vfs-rpc.cpp b/zircon/system/core/devmgr/fshost/vfs-rpc.cpp index 6ec373bfbc0cdb45b34bb1a350bf4ca0ab005749..0356f733ab56f0effd62ad8492d6ae2b250aa3ab 100644 --- a/zircon/system/core/devmgr/fshost/vfs-rpc.cpp +++ b/zircon/system/core/devmgr/fshost/vfs-rpc.cpp @@ -138,7 +138,7 @@ zx_status_t FsManager::InitializeConnections(zx::channel root, zx::channel devfs printf("fshost: cannot create global root: %d\n", status); } - connections_ = fbl::make_unique<FshostConnections>(std::move(devfs_root), std::move(svc_root), + connections_ = std::make_unique<FshostConnections>(std::move(devfs_root), std::move(svc_root), std::move(fs_root), std::move(fshost_event)); // Now that we've initialized our connection to the outside world, // monitor for external shutdown events. diff --git a/zircon/system/dev/block/aml-sd-emmc/aml-sd-emmc.cpp b/zircon/system/dev/block/aml-sd-emmc/aml-sd-emmc.cpp index bd0baa4371997a083c751874d95c26247705c36f..35e80ad14e8b3bc9250870c8b0e5198f9e5c8021 100644 --- a/zircon/system/dev/block/aml-sd-emmc/aml-sd-emmc.cpp +++ b/zircon/system/dev/block/aml-sd-emmc/aml-sd-emmc.cpp @@ -995,7 +995,7 @@ zx_status_t AmlSdEmmc::Create(void* ctx, zx_device_t* parent) { } } - auto dev = fbl::make_unique<AmlSdEmmc>(parent, pdev, std::move(bti), *std::move(mmio), + auto dev = std::make_unique<AmlSdEmmc>(parent, pdev, std::move(bti), *std::move(mmio), *std::move(pinned_mmio), config, std::move(irq), reset_gpio); diff --git a/zircon/system/dev/block/fvm/fvm.cpp b/zircon/system/dev/block/fvm/fvm.cpp index 07c51aad0476dfd4a4a16bd4f75893a5f552f857..f2ca04af78a0b97cf2f7d4cdf3b486a674e25811 100644 --- a/zircon/system/dev/block/fvm/fvm.cpp +++ b/zircon/system/dev/block/fvm/fvm.cpp @@ -57,7 +57,7 @@ zx_status_t VPartitionManager::Bind(zx_device_t* dev) { } bp.ops->query(bp.ctx, &block_info, &block_op_size); - auto vpm = fbl::make_unique<VPartitionManager>(dev, block_info, block_op_size, &bp); + auto vpm = std::make_unique<VPartitionManager>(dev, block_info, block_op_size, &bp); zx_status_t status = vpm->DdkAdd("fvm", DEVICE_ADD_INVISIBLE); if (status != ZX_OK) { diff --git a/zircon/system/dev/block/fvm/vpartition.cpp b/zircon/system/dev/block/fvm/vpartition.cpp index a1b7708e1fabf64ae66263cc939515074e45c449..a17d8f29218ba6c62f8f59381af4de73a1b16714 100644 --- a/zircon/system/dev/block/fvm/vpartition.cpp +++ b/zircon/system/dev/block/fvm/vpartition.cpp @@ -29,7 +29,7 @@ zx_status_t VPartition::Create(VPartitionManager* vpm, size_t entry_index, fbl::unique_ptr<VPartition>* out) { ZX_DEBUG_ASSERT(entry_index != 0); - auto vp = fbl::make_unique<VPartition>(vpm, entry_index, vpm->BlockOpSize()); + auto vp = std::make_unique<VPartition>(vpm, entry_index, vpm->BlockOpSize()); *out = std::move(vp); return ZX_OK; diff --git a/zircon/system/dev/bus/pci/allocation.cpp b/zircon/system/dev/bus/pci/allocation.cpp index d4dcb421000db169740f60a4fda2bb613ad139f1..676cf17eeebecdef678704be1093705e7308cbc0 100644 --- a/zircon/system/dev/bus/pci/allocation.cpp +++ b/zircon/system/dev/bus/pci/allocation.cpp @@ -26,7 +26,7 @@ zx_status_t PciAllocation::CreateVmObject(fbl::unique_ptr<zx::vmo>* out_vmo) con return status; } - *out_vmo = fbl::make_unique<zx::vmo>(std::move(temp)); + *out_vmo = std::make_unique<zx::vmo>(std::move(temp)); return status; } diff --git a/zircon/system/dev/bus/virtio/scsi_test.cpp b/zircon/system/dev/bus/virtio/scsi_test.cpp index f2daa26ccec25e90ebfdbef27862fb46cdfe4716..7e0737a1f965086c8de58506046e2348e1b723aa 100644 --- a/zircon/system/dev/bus/virtio/scsi_test.cpp +++ b/zircon/system/dev/bus/virtio/scsi_test.cpp @@ -33,7 +33,7 @@ class FakeBackendForScsi : public virtio::FakeBackend { bool InitTest() { BEGIN_TEST; - fbl::unique_ptr<virtio::Backend> backend = fbl::make_unique<FakeBackendForScsi>(); + fbl::unique_ptr<virtio::Backend> backend = std::make_unique<FakeBackendForScsi>(); zx::bti bti(ZX_HANDLE_INVALID); virtio::ScsiDevice scsi(/*parent=*/nullptr, std::move(bti), std::move(backend)); diff --git a/zircon/system/dev/clk/amlogic-clk/aml-clk.cpp b/zircon/system/dev/clk/amlogic-clk/aml-clk.cpp index 120c89dcd932a84433d5a718ca006c6717a72334..01d494d5dd089d5a72bdfa1d352519ccab682421 100644 --- a/zircon/system/dev/clk/amlogic-clk/aml-clk.cpp +++ b/zircon/system/dev/clk/amlogic-clk/aml-clk.cpp @@ -170,7 +170,7 @@ zx_status_t AmlClock::InitPdev(zx_device_t* parent) { } zx_status_t AmlClock::Create(zx_device_t* parent) { - auto clock_device = fbl::make_unique<amlogic_clock::AmlClock>(parent); + auto clock_device = std::make_unique<amlogic_clock::AmlClock>(parent); zx_status_t status = clock_device->InitPdev(parent); if (status != ZX_OK) { diff --git a/zircon/system/dev/ethernet/dwmac/dwmac.cpp b/zircon/system/dev/ethernet/dwmac/dwmac.cpp index 79c8afbbe4bf6924ded0f215d64e35320d764cab..eefde921fb2e66cd088d4a85f5f353efc2fb4821 100644 --- a/zircon/system/dev/ethernet/dwmac/dwmac.cpp +++ b/zircon/system/dev/ethernet/dwmac/dwmac.cpp @@ -192,7 +192,7 @@ zx_status_t DWMacDevice::Create(void* ctx, zx_device_t* device) { return status; } - auto mac_device = fbl::make_unique<DWMacDevice>(device, &pdev, ð_board); + auto mac_device = std::make_unique<DWMacDevice>(device, &pdev, ð_board); status = mac_device->InitPdev(); if (status != ZX_OK) { diff --git a/zircon/system/dev/input/focaltech/ft_device.cpp b/zircon/system/dev/input/focaltech/ft_device.cpp index 97e9a0e20acef473240cbbca8c374aea3afacb8c..5c0fff64cae6547b0310e5b7a1525d5ca49c8c3d 100644 --- a/zircon/system/dev/input/focaltech/ft_device.cpp +++ b/zircon/system/dev/input/focaltech/ft_device.cpp @@ -126,7 +126,7 @@ zx_status_t FtDevice::Create(zx_device_t* device) { zxlogf(INFO, "focaltouch: driver started...\n"); - auto ft_dev = fbl::make_unique<FtDevice>(device); + auto ft_dev = std::make_unique<FtDevice>(device); zx_status_t status = ft_dev->InitPdev(); if (status != ZX_OK) { zxlogf(ERROR, "focaltouch: Driver bind failed %d\n", status); diff --git a/zircon/system/dev/input/goodix/gt92xx.cpp b/zircon/system/dev/input/goodix/gt92xx.cpp index d525f1021f75baf1f62f0dd43e4ef28d1c910b44..b828be4d9447fe27d1a3b881a81f6dbd4dd1beba 100644 --- a/zircon/system/dev/input/goodix/gt92xx.cpp +++ b/zircon/system/dev/input/goodix/gt92xx.cpp @@ -112,7 +112,7 @@ zx_status_t Gt92xxDevice::Create(zx_device_t* device) { zxlogf(ERROR, "%s failed to allocate gpio or i2c\n", __func__); return ZX_ERR_NO_RESOURCES; } - auto goodix_dev = fbl::make_unique<Gt92xxDevice>(device, + auto goodix_dev = std::make_unique<Gt92xxDevice>(device, std::move(i2c), std::move(intr), std::move(reset)); diff --git a/zircon/system/dev/light-sensor/ams-light/tcs3400.cpp b/zircon/system/dev/light-sensor/ams-light/tcs3400.cpp index 6faf0908e9c16708769da324c5324cb6ed9ceaad..054b3c45805075318dbabf7f4e579bfdf2633ac5 100644 --- a/zircon/system/dev/light-sensor/ams-light/tcs3400.cpp +++ b/zircon/system/dev/light-sensor/ams-light/tcs3400.cpp @@ -426,7 +426,7 @@ void Tcs3400Device::DdkRelease() { } // namespace tcs extern "C" zx_status_t tcs3400_bind(void* ctx, zx_device_t* parent) { - auto dev = fbl::make_unique<tcs::Tcs3400Device>(parent); + auto dev = std::make_unique<tcs::Tcs3400Device>(parent); auto status = dev->Bind(); if (status == ZX_OK) { // devmgr is now in charge of the memory for dev diff --git a/zircon/system/dev/misc/test/test.cpp b/zircon/system/dev/misc/test/test.cpp index 994459fa8386eb9ae7f3a7ce917c7f09c04db510..4e5bc44f11a61b6e533b9149720a4e0d59011ad8 100644 --- a/zircon/system/dev/misc/test/test.cpp +++ b/zircon/system/dev/misc/test/test.cpp @@ -167,7 +167,7 @@ zx_status_t TestRootDevice::CreateDevice(const fbl::StringPiece& name, return ZX_ERR_BUFFER_TOO_SMALL; } - auto device = fbl::make_unique<TestDevice>(zxdev()); + auto device = std::make_unique<TestDevice>(zxdev()); zx_status_t status = device->DdkAdd(devname); if (status != ZX_OK) { return status; @@ -199,7 +199,7 @@ zx_status_t TestRootDevice::DdkMessage(fidl_msg_t* msg, fidl_txn_t* txn) { } zx_status_t TestDriverBind(void* ctx, zx_device_t* dev) { - auto root = fbl::make_unique<TestRootDevice>(dev); + auto root = std::make_unique<TestRootDevice>(dev); zx_status_t status = root->Bind(); if (status != ZX_OK) { return status; diff --git a/zircon/system/dev/nand/nandpart/test/aml-bad-block-test.cpp b/zircon/system/dev/nand/nandpart/test/aml-bad-block-test.cpp index f73cf51ed24513c6021a62ab5e69f98437d33a0d..23dc6db6e45b5a40c8b59c9ca57102600cd6ff32 100644 --- a/zircon/system/dev/nand/nandpart/test/aml-bad-block-test.cpp +++ b/zircon/system/dev/nand/nandpart/test/aml-bad-block-test.cpp @@ -176,7 +176,7 @@ void MockQueue(void* ctx, nand_operation_t* op, nand_queue_callback completion_c bad_blocks.push_back(block); } } - auto node = fbl::make_unique<TableNode>(op->rw.offset_nand + i, std::move(bad_blocks), + auto node = std::make_unique<TableNode>(op->rw.offset_nand + i, std::move(bad_blocks), true, oob->generation); if (!context->table_entries.insert_or_find(std::move(node))) { unittest_printf("Trying to write to a page that isn't erased!\n"); @@ -218,8 +218,8 @@ bool GetBadBlockListTest() { BEGIN_TEST; TableNode::ResetCount(); TableEntries table_entries; - table_entries.insert_or_replace(fbl::make_unique<TableNode>(0)); - table_entries.insert_or_replace(fbl::make_unique<TableNode>(1)); + table_entries.insert_or_replace(std::make_unique<TableNode>(0)); + table_entries.insert_or_replace(std::make_unique<TableNode>(1)); Context context = { .table_entries = table_entries, }; @@ -240,9 +240,9 @@ bool GetBadBlockListWithEntriesTest() { BEGIN_TEST; TableNode::ResetCount(); TableEntries table_entries; - table_entries.insert_or_replace(fbl::make_unique<TableNode>(0)); + table_entries.insert_or_replace(std::make_unique<TableNode>(0)); fbl::Vector<uint32_t> bad_blocks_v = {4, 8}; - table_entries.insert_or_replace(fbl::make_unique<TableNode>(1, std::move(bad_blocks_v))); + table_entries.insert_or_replace(std::make_unique<TableNode>(1, std::move(bad_blocks_v))); Context context = { .table_entries = table_entries, }; @@ -276,12 +276,12 @@ bool FindBadBlockSecondBlockTest() { TableNode::ResetCount(); TableEntries table_entries; fbl::Vector<uint32_t> bad_blocks_1 = {4, 6}; - table_entries.insert_or_replace(fbl::make_unique<TableNode>(0, std::move(bad_blocks_1))); + table_entries.insert_or_replace(std::make_unique<TableNode>(0, std::move(bad_blocks_1))); fbl::Vector<uint32_t> bad_blocks_2 = {4, 6, 8}; - table_entries.insert_or_replace(fbl::make_unique<TableNode>(kPagesPerBlock * 3, + table_entries.insert_or_replace(std::make_unique<TableNode>(kPagesPerBlock * 3, std::move(bad_blocks_2))); fbl::Vector<uint32_t> bad_blocks_3 = {4, 6, 8, 9}; - table_entries.insert_or_replace(fbl::make_unique<TableNode>(kPagesPerBlock, + table_entries.insert_or_replace(std::make_unique<TableNode>(kPagesPerBlock, std::move(bad_blocks_3))); Context context = { .table_entries = table_entries, @@ -304,13 +304,13 @@ bool FindBadBlockLastBlockTest() { TableNode::ResetCount(); TableEntries table_entries; fbl::Vector<uint32_t> bad_blocks_1 = {4, 6}; - table_entries.insert_or_replace(fbl::make_unique<TableNode>(kPagesPerBlock * 2, + table_entries.insert_or_replace(std::make_unique<TableNode>(kPagesPerBlock * 2, std::move(bad_blocks_1))); fbl::Vector<uint32_t> bad_blocks_2 = {4, 6, 8}; - table_entries.insert_or_replace(fbl::make_unique<TableNode>(kPagesPerBlock, + table_entries.insert_or_replace(std::make_unique<TableNode>(kPagesPerBlock, std::move(bad_blocks_2))); fbl::Vector<uint32_t> bad_blocks_3 = {4, 6, 8, 9}; - table_entries.insert_or_replace(fbl::make_unique<TableNode>(kPagesPerBlock * 3, + table_entries.insert_or_replace(std::make_unique<TableNode>(kPagesPerBlock * 3, std::move(bad_blocks_3))); Context context = { .table_entries = table_entries, @@ -332,8 +332,8 @@ bool MarkBlockBadTest() { BEGIN_TEST; TableNode::ResetCount(); TableEntries table_entries; - table_entries.insert_or_replace(fbl::make_unique<TableNode>(0)); - table_entries.insert_or_replace(fbl::make_unique<TableNode>(1)); + table_entries.insert_or_replace(std::make_unique<TableNode>(0)); + table_entries.insert_or_replace(std::make_unique<TableNode>(1)); Context context = { .table_entries = table_entries, }; @@ -363,13 +363,13 @@ bool FindBadBlockLastPageInvalidTest() { TableNode::ResetCount(); TableEntries table_entries; fbl::Vector<uint32_t> bad_blocks_1 = {4, 6}; - table_entries.insert_or_replace(fbl::make_unique<TableNode>(kPagesPerBlock * 2, + table_entries.insert_or_replace(std::make_unique<TableNode>(kPagesPerBlock * 2, std::move(bad_blocks_1))); fbl::Vector<uint32_t> bad_blocks_2 = {4, 6, 8}; - table_entries.insert_or_replace(fbl::make_unique<TableNode>(kPagesPerBlock * 3, + table_entries.insert_or_replace(std::make_unique<TableNode>(kPagesPerBlock * 3, std::move(bad_blocks_2))); fbl::Vector<uint32_t> bad_blocks_3 = {4, 6, 8, 9}; - table_entries.insert_or_replace(fbl::make_unique<TableNode>(kPagesPerBlock * 3 + 1, + table_entries.insert_or_replace(std::make_unique<TableNode>(kPagesPerBlock * 3 + 1, std::move(bad_blocks_3), false)); Context context = { .table_entries = table_entries, @@ -399,10 +399,10 @@ bool FindBadBlockNoValidTest() { TableEntries table_entries; for (uint32_t block = 0; block < 4; block++) { for (uint32_t page = 0; page < 6; page++) { - table_entries.insert_or_replace(fbl::make_unique<TableNode>( + table_entries.insert_or_replace(std::make_unique<TableNode>( kPagesPerBlock * block + page, false)); } - table_entries.insert_or_replace(fbl::make_unique<TableNode>(kPagesPerBlock * block + 6)); + table_entries.insert_or_replace(std::make_unique<TableNode>(kPagesPerBlock * block + 6)); } Context context = { .table_entries = table_entries, @@ -422,11 +422,11 @@ bool FindBadBlockBigHoleTest() { BEGIN_TEST; TableNode::ResetCount(); TableEntries table_entries; - table_entries.insert_or_replace(fbl::make_unique<TableNode>(kPagesPerBlock * 3)); + table_entries.insert_or_replace(std::make_unique<TableNode>(kPagesPerBlock * 3)); for (uint32_t i = 1; i < 9; i++) { - table_entries.insert_or_replace(fbl::make_unique<TableNode>(kPagesPerBlock * 3 + i, false)); + table_entries.insert_or_replace(std::make_unique<TableNode>(kPagesPerBlock * 3 + i, false)); } - table_entries.insert_or_replace(fbl::make_unique<TableNode>(kPagesPerBlock * 3 + 9, + table_entries.insert_or_replace(std::make_unique<TableNode>(kPagesPerBlock * 3 + 9, fbl::Vector<uint32_t>({4}))); Context context = { @@ -450,7 +450,7 @@ bool MarkBlockBadFullBlockTest() { TableNode::ResetCount(); TableEntries table_entries; for (uint32_t i = 0; i < kPagesPerBlock; i++) { - table_entries.insert_or_replace(fbl::make_unique<TableNode>(i)); + table_entries.insert_or_replace(std::make_unique<TableNode>(i)); } Context context = { .table_entries = table_entries, diff --git a/zircon/system/dev/pci/amlogic-pcie/aml-pcie-device.cpp b/zircon/system/dev/pci/amlogic-pcie/aml-pcie-device.cpp index ae5014593c293159b0675df5e9a10ed7a034b633..53cdf9d7566b5d19697de5d9101a4da7c947aae8 100644 --- a/zircon/system/dev/pci/amlogic-pcie/aml-pcie-device.cpp +++ b/zircon/system/dev/pci/amlogic-pcie/aml-pcie-device.cpp @@ -183,7 +183,7 @@ zx_status_t AmlPcieDevice::Init() { st = InitMetadata(); if (st != ZX_OK) return st; - pcie_ = fbl::make_unique<AmlPcie>( + pcie_ = std::make_unique<AmlPcie>( *std::move(dbi_), *std::move(cfg_), *std::move(rst_), diff --git a/zircon/system/dev/power/msm8x53-power/msm8x53-power.cpp b/zircon/system/dev/power/msm8x53-power/msm8x53-power.cpp index 5c7b21d08a274a0e274b71cf1a74b594cbda755b..10b4458dc4d283a401685a092ad7253b889d9e31 100644 --- a/zircon/system/dev/power/msm8x53-power/msm8x53-power.cpp +++ b/zircon/system/dev/power/msm8x53-power/msm8x53-power.cpp @@ -203,7 +203,7 @@ zx_status_t Msm8x53Power::Create(void* ctx, zx_device_t* parent) { return status; } - auto dev = fbl::make_unique<Msm8x53Power>(parent, pdev, *std::move(core_mmio), + auto dev = std::make_unique<Msm8x53Power>(parent, pdev, *std::move(core_mmio), *std::move(chnls_mmio), *std::move(obsvr_mmio), *std::move(intr_mmio), diff --git a/zircon/system/dev/power/mtk-power/mtk-power.cpp b/zircon/system/dev/power/mtk-power/mtk-power.cpp index 1c34da63cbaa33dbe0d33869967cb05eca1bebe0..6a3ed65065a69066180c0529c29c523503dac1dd 100644 --- a/zircon/system/dev/power/mtk-power/mtk-power.cpp +++ b/zircon/system/dev/power/mtk-power/mtk-power.cpp @@ -219,7 +219,7 @@ zx_status_t MtkPower::Create(void* ctx, zx_device_t* parent) { zxlogf(ERROR, "%s Failed to get mmio: %d\n", __FUNCTION__, status); return status; } - auto dev = fbl::make_unique<MtkPower>(parent, pdev, *std::move(mmio)); + auto dev = std::make_unique<MtkPower>(parent, pdev, *std::move(mmio)); if ((status = dev->Init()) != ZX_OK) { return status; diff --git a/zircon/system/dev/rtc/fallback/rtc-impl.cpp b/zircon/system/dev/rtc/fallback/rtc-impl.cpp index 48e9fca908f7ec93cac83948634d5db162bcdfa0..b6b0b3270840b621e5dfe51d78e78edd8f13b75c 100644 --- a/zircon/system/dev/rtc/fallback/rtc-impl.cpp +++ b/zircon/system/dev/rtc/fallback/rtc-impl.cpp @@ -110,7 +110,7 @@ zx_status_t fidl_Set(void* ctx, const fuchsia_hardware_rtc_Time* rtc, fidl_txn_t } // namespace extern "C" zx_status_t fallback_rtc_bind(void* ctx, zx_device_t* parent) { - auto dev = fbl::make_unique<FallbackRtc>(parent); + auto dev = std::make_unique<FallbackRtc>(parent); auto status = dev->Bind(); if (status == ZX_OK) { // devmgr is now in charge of the device, until DdkRelease(). diff --git a/zircon/system/dev/sysmem/sysmem/amlogic_memory_allocator.cpp b/zircon/system/dev/sysmem/sysmem/amlogic_memory_allocator.cpp index b554734bb30290f6e161adec943c471a7291acb9..c494c32b7e281a4c1c9f095450fd96ce000ce9ec 100644 --- a/zircon/system/dev/sysmem/sysmem/amlogic_memory_allocator.cpp +++ b/zircon/system/dev/sysmem/sysmem/amlogic_memory_allocator.cpp @@ -56,7 +56,7 @@ zx_status_t AmlogicMemoryAllocator::Allocate(size_t size, zx::vmo* vmo) { } } - auto region = fbl::make_unique<Region>(); + auto region = std::make_unique<Region>(); zx_status_t status = protected_allocator_.GetRegion(size, ZX_PAGE_SIZE, region->region); if (status != ZX_OK) { diff --git a/zircon/system/dev/sysmem/sysmem/device.cpp b/zircon/system/dev/sysmem/sysmem/device.cpp index 26a94b7ffa1c58e065f85a0117f122aa2531316c..11b12624048f3a1bf5511d771d6780182afa7b62 100644 --- a/zircon/system/dev/sysmem/sysmem/device.cpp +++ b/zircon/system/dev/sysmem/sysmem/device.cpp @@ -106,7 +106,7 @@ zx_status_t Device::Bind() { // TODO: Separate protected memory allocator into separate driver or library if (pdev_device_info_vid_ == PDEV_VID_AMLOGIC && protected_memory_size > 0) { - auto amlogic_allocator = fbl::make_unique<AmlogicMemoryAllocator>(std::move(bti_copy)); + auto amlogic_allocator = std::make_unique<AmlogicMemoryAllocator>(std::move(bti_copy)); status = amlogic_allocator->Init(protected_memory_size); if (status != ZX_OK) { DRIVER_ERROR("Failed to init allocator for amlogic protected memory: %d", status); diff --git a/zircon/system/dev/tee/optee/optee-client.cpp b/zircon/system/dev/tee/optee/optee-client.cpp index 08e20e3ec6250216df27369d806bba0750f6a169..53758422e59f6f5d0d552616a36ab688114e6475 100644 --- a/zircon/system/dev/tee/optee/optee-client.cpp +++ b/zircon/system/dev/tee/optee/optee-client.cpp @@ -222,7 +222,7 @@ zx_status_t OpteeClient::OpenSession(const fuchsia_tee_Uuid* trusted_app, return fuchsia_tee_DeviceOpenSession_reply(txn, kInvalidSession, &result); } - open_sessions_.insert(fbl::make_unique<OpteeSession>(message.session_id())); + open_sessions_.insert(std::make_unique<OpteeSession>(message.session_id())); return fuchsia_tee_DeviceOpenSession_reply(txn, message.session_id(), &result); } diff --git a/zircon/system/dev/tee/optee/optee-controller.cpp b/zircon/system/dev/tee/optee/optee-controller.cpp index 316e850cda1bb8a32a7b9c1e1d5461ac0911eb0f..90da423dc2e90f8fb7aeeb89c244c128e56006e9 100644 --- a/zircon/system/dev/tee/optee/optee-controller.cpp +++ b/zircon/system/dev/tee/optee/optee-controller.cpp @@ -287,7 +287,7 @@ zx_status_t OpteeController::ConnectDevice(zx_handle_t service_provider, ZX_DEBUG_ASSERT(device_request_channel.is_valid()); // Create a new OpteeClient device and hand off client communication to it. - auto client = fbl::make_unique<OpteeClient>(this, std::move(service_provider_channel)); + auto client = std::make_unique<OpteeClient>(this, std::move(service_provider_channel)); // Add child client device and have it immediately start serving device_request // diff --git a/zircon/system/dev/test/mock-device/device.cpp b/zircon/system/dev/test/mock-device/device.cpp index c500ab0324b7b6a854da5d0bc6c1a3a7bf048100..7f3e5e53c47d9811b949b4f7ba2aa86514479f12 100644 --- a/zircon/system/dev/test/mock-device/device.cpp +++ b/zircon/system/dev/test/mock-device/device.cpp @@ -142,7 +142,7 @@ int MockDevice::ThreadFunc(void* raw_arg) { } void MockDevice::CreateThread(zx::channel channel) { - auto arg = fbl::make_unique<ThreadFuncArg>(); + auto arg = std::make_unique<ThreadFuncArg>(); arg->channel = std::move(channel); arg->dev = this; @@ -353,7 +353,7 @@ zx_status_t MockDevice::DdkRxrpc(zx_handle_t channel) { zx_status_t MockDevice::Create(zx_device_t* parent, zx::channel controller, fbl::unique_ptr<MockDevice>* out) { - auto dev = fbl::make_unique<MockDevice>(parent, std::move(controller)); + auto dev = std::make_unique<MockDevice>(parent, std::move(controller)); *out = std::move(dev); return ZX_OK; } diff --git a/zircon/system/dev/test/mock-device/fidl.cpp b/zircon/system/dev/test/mock-device/fidl.cpp index 033087d0aa2939e00d5a730a57b0468bc53397e0..a0a81fa9f46974bc676b61937bcd5c532ef3f2c1 100644 --- a/zircon/system/dev/test/mock-device/fidl.cpp +++ b/zircon/system/dev/test/mock-device/fidl.cpp @@ -26,7 +26,7 @@ zx_status_t ParseActions(const fidl_type_t* type, fidl::Message* msg, return status; } auto payload = msg->GetBytesAs<MessageType>(); - auto array = fbl::make_unique<fuchsia_device_mock_Action[]>(payload->actions.count); + auto array = std::make_unique<fuchsia_device_mock_Action[]>(payload->actions.count); memcpy(array.get(), payload->actions.data, payload->actions.count * sizeof(fuchsia_device_mock_Action)); actions_out->reset(array.release(), payload->actions.count); diff --git a/zircon/system/dev/test/sysdev/sysdev.cpp b/zircon/system/dev/test/sysdev/sysdev.cpp index 7b7c5a0f41f6a856cc5cadd7b2476af71050aae4..96e0279084a668689fb08b803056e4449341145c 100644 --- a/zircon/system/dev/test/sysdev/sysdev.cpp +++ b/zircon/system/dev/test/sysdev/sysdev.cpp @@ -31,7 +31,7 @@ public: }; zx_status_t Sysdev::Create(zx_device_t* parent, const char* name, zx::channel items_svc) { - auto sysdev = fbl::make_unique<Sysdev>(parent); + auto sysdev = std::make_unique<Sysdev>(parent); zx_status_t status = sysdev->DdkAdd("sys", DEVICE_ADD_NON_BINDABLE, nullptr /* props */, 0 /* prop_count */); diff --git a/zircon/system/dev/thermal/aml-thermal-s912/aml-thermal.cpp b/zircon/system/dev/thermal/aml-thermal-s912/aml-thermal.cpp index d6a1a5a26110a787ad8da38ec8e31466b121067a..83e9d8cafc993600b591a9862fd2b37a6d47464d 100644 --- a/zircon/system/dev/thermal/aml-thermal-s912/aml-thermal.cpp +++ b/zircon/system/dev/thermal/aml-thermal-s912/aml-thermal.cpp @@ -85,7 +85,7 @@ zx_status_t AmlThermal::Create(void* ctx, zx_device_t* device) { return status; } - auto thermal = fbl::make_unique<AmlThermal>(device, fan0_gpio_proto, fan1_gpio_proto, + auto thermal = std::make_unique<AmlThermal>(device, fan0_gpio_proto, fan1_gpio_proto, scpi_proto, sensor_id, port); status = thermal->DdkAdd("vim-thermal", DEVICE_ADD_INVISIBLE); diff --git a/zircon/system/host/fvm/mtd.cpp b/zircon/system/host/fvm/mtd.cpp index de4211ad43ae19cd9644df2aea37a17d0df25ce9..112fc2760690435cd539bf0e3fa9d93821c3b12d 100644 --- a/zircon/system/host/fvm/mtd.cpp +++ b/zircon/system/host/fvm/mtd.cpp @@ -44,7 +44,7 @@ zx_status_t CreateFileWrapperFromMtd(const char* path, uint32_t offset, uint32_t return ZX_ERR_BAD_STATE; } - auto ftl_wrapper = fbl::make_unique<ftl_mtd::FtlVolumeWrapper>(); + auto ftl_wrapper = std::make_unique<ftl_mtd::FtlVolumeWrapper>(); status = ftl_wrapper->Init(std::move(driver)); if (status != ZX_OK) { diff --git a/zircon/system/ulib/async-testutils/test_loop.cpp b/zircon/system/ulib/async-testutils/test_loop.cpp index f4a46a5c2ac5a0cb3b5e37b0d9b526b08e6e4ae3..ddb87b41e1e986dc1363b035054c5e500533bb1a 100644 --- a/zircon/system/ulib/async-testutils/test_loop.cpp +++ b/zircon/system/ulib/async-testutils/test_loop.cpp @@ -93,7 +93,7 @@ TestLoop::TestLoop() : TestLoop(0) {} TestLoop::TestLoop(uint32_t state) : time_keeper_(new TestLoopTimeKeeper()), initial_state_((state != 0)? state : GetRandomSeed()), state_(initial_state_) { - dispatchers_.push_back(fbl::make_unique<TestLoopDispatcher>(time_keeper_.get())); + dispatchers_.push_back(std::make_unique<TestLoopDispatcher>(time_keeper_.get())); async_set_default_dispatcher(dispatchers_[0].get()); printf("\nTEST_LOOP_RANDOM_SEED=\"%u\"\n", initial_state_); @@ -108,9 +108,9 @@ async_dispatcher_t* TestLoop::dispatcher() { } fbl::unique_ptr<LoopInterface> TestLoop::StartNewLoop() { - dispatchers_.push_back(fbl::make_unique<TestLoopDispatcher>(time_keeper_.get())); + dispatchers_.push_back(std::make_unique<TestLoopDispatcher>(time_keeper_.get())); auto* new_dispatcher = dispatchers_[dispatchers_.size() - 1].get(); - return fbl::make_unique<TestLoopInterface>(this, new_dispatcher); + return std::make_unique<TestLoopInterface>(this, new_dispatcher); } zx::time TestLoop::Now() const { diff --git a/zircon/system/ulib/async-testutils/test_loop_dispatcher.cpp b/zircon/system/ulib/async-testutils/test_loop_dispatcher.cpp index d9211b83c52f62eca592ed92370ef128f95d4de3..abb4297509edf6f3b4758a612d62421bd9291e25 100644 --- a/zircon/system/ulib/async-testutils/test_loop_dispatcher.cpp +++ b/zircon/system/ulib/async-testutils/test_loop_dispatcher.cpp @@ -124,7 +124,7 @@ zx_status_t TestLoopDispatcher::BeginWait(async_wait_t* wait) { return ZX_ERR_CANCELED; } - activables_.push_back(fbl::make_unique<WaitActivable>(this, wait)); + activables_.push_back(std::make_unique<WaitActivable>(this, wait)); return ZX_OK; } @@ -198,7 +198,7 @@ void TestLoopDispatcher::ExtractActivated() { // Move all tasks that reach their deadline to the activable list. while (!future_tasks_.empty() && (*future_tasks_.begin())->deadline <= Now().get()) { - activables_.push_back(fbl::make_unique<TaskActivable>(this, (*future_tasks_.begin()))); + activables_.push_back(std::make_unique<TaskActivable>(this, (*future_tasks_.begin()))); future_tasks_.erase(future_tasks_.begin()); } diff --git a/zircon/system/ulib/blobfs/blob.cpp b/zircon/system/ulib/blobfs/blob.cpp index 67a333528e4ed9ad139192798d4124a781b39113..570f9cbeaac8876edb1c1b2666e4308789efb185 100644 --- a/zircon/system/ulib/blobfs/blob.cpp +++ b/zircon/system/ulib/blobfs/blob.cpp @@ -306,7 +306,7 @@ zx_status_t Blob::SpaceAllocate(uint64_t size_data) { return ZX_ERR_BAD_STATE; } - auto write_info = fbl::make_unique<WritebackInfo>(); + auto write_info = std::make_unique<WritebackInfo>(); // Initialize the inode with known fields. memset(inode_.merkle_root_hash, 0, Digest::kLength); diff --git a/zircon/system/ulib/blobfs/blobfs.cpp b/zircon/system/ulib/blobfs/blobfs.cpp index e970d016cef72ed2a969ed4dbbcf589fb8fab77d..c6179d27f4e22cbee2675b96cb1c715ed8bc6d85 100644 --- a/zircon/system/ulib/blobfs/blobfs.cpp +++ b/zircon/system/ulib/blobfs/blobfs.cpp @@ -589,7 +589,7 @@ zx_status_t Blobfs::Create(fbl::unique_fd fd, const MountOptions& options, const return status; } - fs->allocator_ = fbl::make_unique<Allocator>(fs.get(), std::move(block_map), + fs->allocator_ = std::make_unique<Allocator>(fs.get(), std::move(block_map), std::move(node_map), std::move(nodes_bitmap)); if ((status = fs->allocator_->ResetFromStorage(fs::ReadTxn(fs.get()))) != ZX_OK) { FS_TRACE_ERROR("blobfs: Failed to load bitmaps: %d\n", status); diff --git a/zircon/system/ulib/blobfs/directory.cpp b/zircon/system/ulib/blobfs/directory.cpp index 6a3b0ee4f8afe6552e450e1b8aa1c242a10d61cc..82c17839c9cdeece24e56fbd9ecb90cef97be727 100644 --- a/zircon/system/ulib/blobfs/directory.cpp +++ b/zircon/system/ulib/blobfs/directory.cpp @@ -234,7 +234,7 @@ private: #ifdef __Fuchsia__ zx_status_t Directory::Serve(fs::Vfs* vfs, zx::channel channel, uint32_t flags) { - return vfs->ServeConnection(fbl::make_unique<DirectoryConnection>( + return vfs->ServeConnection(std::make_unique<DirectoryConnection>( vfs, fbl::WrapRefPtr(this), std::move(channel), flags)); } #endif diff --git a/zircon/system/ulib/blobfs/journal.cpp b/zircon/system/ulib/blobfs/journal.cpp index 6b99c8a2bdc183029a2cfcf7304512d9263a789e..3aebd9da3fdbdacc9979a3aad97651a254bea601 100644 --- a/zircon/system/ulib/blobfs/journal.cpp +++ b/zircon/system/ulib/blobfs/journal.cpp @@ -399,7 +399,7 @@ fbl::unique_ptr<JournalEntry> Journal::CreateEntry(uint64_t header_index, uint64 status = EntryStatus::kError; } - return fbl::make_unique<JournalEntry>(this, status, header_index, commit_index, + return std::make_unique<JournalEntry>(this, status, header_index, commit_index, std::move(work)); } diff --git a/zircon/system/ulib/blobfs/test/journal-test.cpp b/zircon/system/ulib/blobfs/test/journal-test.cpp index a2f85dc742e935f7e7587ff3ff0b6c98b657ee8c..4b6e82a8a36aa53a6588894a5ed4cf1b63e2f9a9 100644 --- a/zircon/system/ulib/blobfs/test/journal-test.cpp +++ b/zircon/system/ulib/blobfs/test/journal-test.cpp @@ -59,7 +59,7 @@ private: } fbl::unique_ptr<WritebackWork> CreateWork() final { - return fbl::make_unique<WritebackWork>(nullptr); + return std::make_unique<WritebackWork>(nullptr); } // The following functions are no-ops, and only exist so they can be called by the diff --git a/zircon/system/ulib/blobfs/test/utils.cpp b/zircon/system/ulib/blobfs/test/utils.cpp index 20df80e5a8e5802752afcbf547c95322ed5a1312..74d41be5704bfcfc71e9c30d9342f8fe8ace06ed 100644 --- a/zircon/system/ulib/blobfs/test/utils.cpp +++ b/zircon/system/ulib/blobfs/test/utils.cpp @@ -25,7 +25,7 @@ bool InitializeAllocator(size_t blocks, size_t nodes, MockSpaceManager* space_ma space_manager->MutableInfo().data_block_count = blocks; std::unique_ptr<IdAllocator> nodes_bitmap = {}; ASSERT_EQ(ZX_OK, IdAllocator::Create(nodes, &nodes_bitmap), "nodes bitmap"); - *out = fbl::make_unique<Allocator>(space_manager, std::move(block_map), std::move(node_map), + *out = std::make_unique<Allocator>(space_manager, std::move(block_map), std::move(node_map), std::move(nodes_bitmap)); (*out)->SetLogging(false); END_HELPER; diff --git a/zircon/system/ulib/ddktl/test/ethernet-tests.cpp b/zircon/system/ulib/ddktl/test/ethernet-tests.cpp index 17f088dc617baa4fedc5c19c6334288d0c8f3473..5adaf82cdfea72699074b327c3c6047ffec6354d 100644 --- a/zircon/system/ulib/ddktl/test/ethernet-tests.cpp +++ b/zircon/system/ulib/ddktl/test/ethernet-tests.cpp @@ -101,7 +101,7 @@ public: zx_status_t EthmacStart(const ethmac_ifc_protocol_t* ifc) { start_this_ = get_this(); - client_ = fbl::make_unique<ddk::EthmacIfcProtocolClient>(ifc); + client_ = std::make_unique<ddk::EthmacIfcProtocolClient>(ifc); start_called_ = true; return ZX_OK; } diff --git a/zircon/system/ulib/devmgr-integration-test/launcher.cpp b/zircon/system/ulib/devmgr-integration-test/launcher.cpp index 8aab78a15269a0dade5a0380cbfe47f096b68962..1a49e97e646ec7c82c505b6820678c32d13ddcaf 100644 --- a/zircon/system/ulib/devmgr-integration-test/launcher.cpp +++ b/zircon/system/ulib/devmgr-integration-test/launcher.cpp @@ -66,7 +66,7 @@ int bootsvc_main(void* arg) { root->AddEntry(fuchsia_boot_Items_Name, node); // Serve VFS on channel. - auto conn = fbl::make_unique<fs::Connection>(&vfs, root, std::move(data->server), + auto conn = std::make_unique<fs::Connection>(&vfs, root, std::move(data->server), ZX_FS_FLAG_DIRECTORY | ZX_FS_RIGHT_READABLE | ZX_FS_RIGHT_WRITABLE); diff --git a/zircon/system/ulib/fbl/include/fbl/function.h b/zircon/system/ulib/fbl/include/fbl/function.h index 90a1e94d59bffe3cba01d35886e84edcab53b015..4295ba1045c901d20d3964731d66cd91dcaece3a 100644 --- a/zircon/system/ulib/fbl/include/fbl/function.h +++ b/zircon/system/ulib/fbl/include/fbl/function.h @@ -113,7 +113,7 @@ template <typename Callable, typename Result, typename... Args> class HeapFunctionTarget final : public FunctionTarget<Result, Args...> { public: explicit HeapFunctionTarget(Callable target) - : target_ptr_(fbl::make_unique<Callable>(std::move(target))) {} + : target_ptr_(std::make_unique<Callable>(std::move(target))) {} HeapFunctionTarget(Callable target, AllocChecker* ac) : target_ptr_(fbl::make_unique_checked<Callable>(ac, std::move(target))) {} HeapFunctionTarget(HeapFunctionTarget&& other) diff --git a/zircon/system/ulib/fbl/include/fbl/unique_ptr.h b/zircon/system/ulib/fbl/include/fbl/unique_ptr.h index d756bd44f92bc213b4710844180649cc26657c66..5c6b5742e3dfae21f88fcad0c04aafeda9dc8a13 100644 --- a/zircon/system/ulib/fbl/include/fbl/unique_ptr.h +++ b/zircon/system/ulib/fbl/include/fbl/unique_ptr.h @@ -45,20 +45,6 @@ struct unique_type<T[]> { } // namespace internal -// Constructs a new object and assigns it to a unique_ptr. -template <typename T, typename... Args> -typename internal::unique_type<T>::single -make_unique(Args&&... args) { - return unique_ptr<T>(new T(std::forward<Args>(args)...)); -} - -template <typename T, typename... Args> -typename internal::unique_type<T>::incomplete_array -make_unique(size_t size) { - using single_type = std::remove_extent_t<T>; - return unique_ptr<single_type[]>(new single_type[size]()); -} - template <typename T, typename... Args> typename internal::unique_type<T>::single make_unique_checked(AllocChecker* ac, Args&&... args) { diff --git a/zircon/system/ulib/fs/pseudo-dir.cpp b/zircon/system/ulib/fs/pseudo-dir.cpp index c52bd926a0d0c73a13e752958138573a06c062b9..157de83475aaefa6b1d8e90a52fa8f0ab881364c 100644 --- a/zircon/system/ulib/fs/pseudo-dir.cpp +++ b/zircon/system/ulib/fs/pseudo-dir.cpp @@ -106,7 +106,7 @@ zx_status_t PseudoDir::AddEntry(fbl::String name, fbl::RefPtr<fs::Vnode> vn) { } Notify(name.ToStringPiece(), fuchsia_io_WATCH_EVENT_ADDED); - auto entry = fbl::make_unique<Entry>(next_node_id_++, + auto entry = std::make_unique<Entry>(next_node_id_++, std::move(name), std::move(vn)); entries_by_name_.insert(entry.get()); entries_by_id_.insert(std::move(entry)); diff --git a/zircon/system/ulib/fs/vnode.cpp b/zircon/system/ulib/fs/vnode.cpp index 0f7cac2d78521c83635e6410658e491e729f9c3c..b6fc6bf8a45c6b57e9804c85e77f0cbfb8cd1387 100644 --- a/zircon/system/ulib/fs/vnode.cpp +++ b/zircon/system/ulib/fs/vnode.cpp @@ -18,7 +18,7 @@ Vnode::~Vnode() = default; #ifdef __Fuchsia__ zx_status_t Vnode::Serve(fs::Vfs* vfs, zx::channel channel, uint32_t flags) { - return vfs->ServeConnection(fbl::make_unique<Connection>( + return vfs->ServeConnection(std::make_unique<Connection>( vfs, fbl::WrapRefPtr(this), std::move(channel), flags)); } diff --git a/zircon/system/ulib/fvm-host/file-wrapper.cpp b/zircon/system/ulib/fvm-host/file-wrapper.cpp index 1cbdcb64d6458d9387f163daa3fb47aceb265a79..6f7a383a471f33715fc79b74a8b381fa069e9998 100644 --- a/zircon/system/ulib/fvm-host/file-wrapper.cpp +++ b/zircon/system/ulib/fvm-host/file-wrapper.cpp @@ -44,7 +44,7 @@ zx_status_t UniqueFdWrapper::Open( return ZX_ERR_IO; } - *out = fbl::make_unique<UniqueFdWrapper>(std::move(fd)); + *out = std::make_unique<UniqueFdWrapper>(std::move(fd)); return ZX_OK; } diff --git a/zircon/system/ulib/fvm-host/fvm-info.cpp b/zircon/system/ulib/fvm-host/fvm-info.cpp index 4601ec836ca50f86da24ec4e8c657b71eee11be3..439b813c737cc237b112a21a6a74c722a86896e9 100644 --- a/zircon/system/ulib/fvm-host/fvm-info.cpp +++ b/zircon/system/ulib/fvm-host/fvm-info.cpp @@ -95,7 +95,7 @@ zx_status_t FvmInfo::Load(fvm::host::FileWrapper* file, uint64_t disk_offset, ui size_t old_slice_size = SuperBlock()->slice_size; size_t old_metadata_size = fvm::MetadataSize(disk_size, old_slice_size); fbl::unique_ptr<uint8_t[]> old_metadata = - fbl::make_unique<uint8_t[]>(old_metadata_size * 2); + std::make_unique<uint8_t[]>(old_metadata_size * 2); // Read remainder of metadata. file->Seek(disk_offset, SEEK_SET); diff --git a/zircon/system/ulib/inspect-vmo/include/lib/inspect-vmo/snapshot.h b/zircon/system/ulib/inspect-vmo/include/lib/inspect-vmo/snapshot.h index c97cda55efc546589d5b9c819982e4ce3ac2d5d2..60f328ad7d34e7bd9fc892089149f49c3c03d643 100644 --- a/zircon/system/ulib/inspect-vmo/include/lib/inspect-vmo/snapshot.h +++ b/zircon/system/ulib/inspect-vmo/include/lib/inspect-vmo/snapshot.h @@ -28,7 +28,7 @@ namespace vmo { // Test Example: // zx_status_t status = Snapshot::Create(std::move(vmo), // {.read_attempts = 1024, .skip_consistency_check = false}, -// fbl::make_unique<TestCallback>(), +// std::make_unique<TestCallback>(), // &snapshot); class Snapshot final { public: diff --git a/zircon/system/ulib/kms-stateless/kms-stateless.cpp b/zircon/system/ulib/kms-stateless/kms-stateless.cpp index 2e2f09a02bb47e8fe7762918da5a9f7d4cdf03aa..fe7d295f874e4c168980dac1bf2d3948610d45b7 100644 --- a/zircon/system/ulib/kms-stateless/kms-stateless.cpp +++ b/zircon/system/ulib/kms-stateless/kms-stateless.cpp @@ -73,7 +73,7 @@ public: return fbl::unique_ptr<ScopedTeecSession>(); } fbl::unique_ptr<ScopedTeecSession> session_ptr = - fbl::make_unique<ScopedTeecSession>(session); + std::make_unique<ScopedTeecSession>(session); return session_ptr; } diff --git a/zircon/system/ulib/memfs/memfs-local.cpp b/zircon/system/ulib/memfs/memfs-local.cpp index a98a67854296ac16d386d8e1d580b4cd0c51b02c..ab0ed59a9c553730a7924b6bcac7515b540abe25 100644 --- a/zircon/system/ulib/memfs/memfs-local.cpp +++ b/zircon/system/ulib/memfs/memfs-local.cpp @@ -49,7 +49,7 @@ zx_status_t memfs_create_filesystem_with_page_limit(async_dispatcher_t* dispatch return status; } - fbl::unique_ptr<memfs_filesystem_t> fs = fbl::make_unique<memfs_filesystem_t>(max_num_pages); + fbl::unique_ptr<memfs_filesystem_t> fs = std::make_unique<memfs_filesystem_t>(max_num_pages); fs->vfs.SetDispatcher(dispatcher); fbl::RefPtr<memfs::VnodeDir> root; diff --git a/zircon/system/ulib/minfs/vnode.cpp b/zircon/system/ulib/minfs/vnode.cpp index 9ada18a5540b64bbc33bb95e8a8f22544b95645e..df845d466b11ffa0d86d1c42da6e66a347b77639 100644 --- a/zircon/system/ulib/minfs/vnode.cpp +++ b/zircon/system/ulib/minfs/vnode.cpp @@ -1339,7 +1339,7 @@ zx_status_t VnodeMinfs::ValidateFlags(uint32_t flags) { #ifdef __Fuchsia__ zx_status_t VnodeMinfs::Serve(fs::Vfs* vfs, zx::channel channel, uint32_t flags) { - return vfs->ServeConnection(fbl::make_unique<MinfsConnection>( + return vfs->ServeConnection(std::make_unique<MinfsConnection>( vfs, fbl::WrapRefPtr(this), std::move(channel), flags)); } #endif diff --git a/zircon/system/ulib/trace-provider/session.cpp b/zircon/system/ulib/trace-provider/session.cpp index 480d28b7e5e3e04626198e318d7d54a849ef31dd..58a2b4f1983ef0fb4f6375523a4b68e9e67ad52c 100644 --- a/zircon/system/ulib/trace-provider/session.cpp +++ b/zircon/system/ulib/trace-provider/session.cpp @@ -32,7 +32,7 @@ Session::Session(void* buffer, size_t buffer_num_bytes, enabled_categories_(std::move(enabled_categories)) { // Build a quick lookup table for IsCategoryEnabled(). for (const auto& cat : enabled_categories_) { - auto entry = fbl::make_unique<StringSetEntry>(cat.c_str()); + auto entry = std::make_unique<StringSetEntry>(cat.c_str()); enabled_category_set_.insert_or_find(std::move(entry)); } } diff --git a/zircon/system/ulib/trace-reader/reader.cpp b/zircon/system/ulib/trace-reader/reader.cpp index 4bd16a64db154093e3c4917a6da99cb5b2272c5c..a2c395d265ad2269dd542271843c707502c9e6d0 100644 --- a/zircon/system/ulib/trace-reader/reader.cpp +++ b/zircon/system/ulib/trace-reader/reader.cpp @@ -564,7 +564,7 @@ void TraceReader::SetCurrentProvider(ProviderId id) { } void TraceReader::RegisterProvider(ProviderId id, fbl::String name) { - auto provider = fbl::make_unique<ProviderInfo>(); + auto provider = std::make_unique<ProviderInfo>(); provider->id = id; provider->name = name; current_provider_ = provider.get(); @@ -576,7 +576,7 @@ void TraceReader::RegisterString(trace_string_index_t index, fbl::String string) ZX_DEBUG_ASSERT(index >= TRACE_ENCODED_STRING_REF_MIN_INDEX && index <= TRACE_ENCODED_STRING_REF_MAX_INDEX); - auto entry = fbl::make_unique<StringTableEntry>(index, string); + auto entry = std::make_unique<StringTableEntry>(index, string); current_provider_->string_table.insert_or_replace(std::move(entry)); } @@ -585,7 +585,7 @@ void TraceReader::RegisterThread(trace_thread_index_t index, ZX_DEBUG_ASSERT(index >= TRACE_ENCODED_THREAD_REF_MIN_INDEX && index <= TRACE_ENCODED_THREAD_REF_MAX_INDEX); - auto entry = fbl::make_unique<ThreadTableEntry>(index, process_thread); + auto entry = std::make_unique<ThreadTableEntry>(index, process_thread); current_provider_->thread_table.insert_or_replace(std::move(entry)); } diff --git a/zircon/system/utest/async-testutils/test_loop_tests.cpp b/zircon/system/utest/async-testutils/test_loop_tests.cpp index a2ae67afe0b6427aa351bddddaf9217679c40556..ad7680ace7ed7be79fe07d85beaea28915378cbe 100644 --- a/zircon/system/utest/async-testutils/test_loop_tests.cpp +++ b/zircon/system/utest/async-testutils/test_loop_tests.cpp @@ -455,7 +455,7 @@ bool HugeAmountOfTaskAreDispatched() { size_t wait_count = 0; // Creating the array on the heap as its size is greater than the available // stack. - auto waits_ptr = fbl::make_unique<std::array<async::Wait, kPostCount>>(); + auto waits_ptr = std::make_unique<std::array<async::Wait, kPostCount>>(); auto& waits = *waits_ptr; for (size_t i = 0; i < kPostCount; ++i) { diff --git a/zircon/system/utest/cobalt-client/cobalt_logger_test.cpp b/zircon/system/utest/cobalt-client/cobalt_logger_test.cpp index dacc377d1cb00d04ba191aa9118b31e7bd028ea6..d52b9a82f0d2a4c6fdbb69a483b9e5f4099b36f4 100644 --- a/zircon/system/utest/cobalt-client/cobalt_logger_test.cpp +++ b/zircon/system/utest/cobalt-client/cobalt_logger_test.cpp @@ -382,7 +382,7 @@ private: Context() { services.loop = - std::move(fbl::make_unique<async::Loop>(&kAsyncLoopConfigNoAttachToThread)); + std::move(std::make_unique<async::Loop>(&kAsyncLoopConfigNoAttachToThread)); } struct ReturnValues { @@ -420,7 +420,7 @@ private: return_values.service_connect); } fbl::unique_ptr<CobaltLogger> logger = - fbl::make_unique<CobaltLogger>(std::move(options)); + std::make_unique<CobaltLogger>(std::move(options)); services.loop->StartThread("FactoryServiceThread"); return logger; } diff --git a/zircon/system/utest/core/pager/pager.cpp b/zircon/system/utest/core/pager/pager.cpp index ad1daf587c3a9932541cbd0621c8d15766560a32..ca22872c9b869f0f1fffb501b9d32c4c54b4e11b 100644 --- a/zircon/system/utest/core/pager/pager.cpp +++ b/zircon/system/utest/core/pager/pager.cpp @@ -190,7 +190,7 @@ bool concurrent_overlapping_access_test(bool check_vmar) { constexpr uint64_t kNumThreads = 32; fbl::unique_ptr<TestThread> threads[kNumThreads]; for (unsigned i = 0; i < kNumThreads; i++) { - threads[i] = fbl::make_unique<TestThread>([vmo, check_vmar]() -> bool { + threads[i] = std::make_unique<TestThread>([vmo, check_vmar]() -> bool { return check_buffer(vmo, 0, 1, check_vmar); }); @@ -225,7 +225,7 @@ bool bulk_single_supply_test(bool check_vmar) { fbl::unique_ptr<TestThread> ts[kNumPages]; for (unsigned i = 0; i < kNumPages; i++) { - ts[i] = fbl::make_unique<TestThread>([vmo, i, check_vmar]() -> bool { + ts[i] = std::make_unique<TestThread>([vmo, i, check_vmar]() -> bool { return check_buffer(vmo, i, 1, check_vmar); }); ASSERT_TRUE(ts[i]->Start()); @@ -269,7 +269,7 @@ bool bulk_odd_supply_test_inner(bool check_vmar, bool use_src_offset) { fbl::unique_ptr<TestThread> ts[kSupplyLengths[supply_idx]]; for (uint64_t j = 0; j < kSupplyLengths[supply_idx]; j++) { uint64_t thread_offset = offset + j; - ts[j] = fbl::make_unique<TestThread>([vmo, thread_offset, check_vmar]() -> bool { + ts[j] = std::make_unique<TestThread>([vmo, thread_offset, check_vmar]() -> bool { return check_buffer(vmo, thread_offset, 1, check_vmar); }); ASSERT_TRUE(ts[j]->Start()); @@ -348,7 +348,7 @@ bool many_request_test(bool check_vmar) { fbl::unique_ptr<TestThread> ts[kNumPages]; for (unsigned i = 0; i < kNumPages; i++) { - ts[i] = fbl::make_unique<TestThread>([vmo, i, check_vmar]() -> bool { + ts[i] = std::make_unique<TestThread>([vmo, i, check_vmar]() -> bool { return check_buffer(vmo, i, 1, check_vmar); }); ASSERT_TRUE(ts[i]->Start()); @@ -409,7 +409,7 @@ bool multiple_concurrent_vmo_test() { for (unsigned i = 0; i < kNumVmos; i++) { ASSERT_TRUE(pager.CreateVmo(1, vmos + i)); - ts[i] = fbl::make_unique<TestThread>([vmo = vmos[i]]() -> bool { + ts[i] = std::make_unique<TestThread>([vmo = vmos[i]]() -> bool { return check_buffer(vmo, 0, 1, true); }); @@ -468,7 +468,7 @@ bool vmar_remap_test() { fbl::unique_ptr<TestThread> ts[kNumPages]; for (unsigned i = 0; i < kNumPages; i++) { - ts[i] = fbl::make_unique<TestThread>([vmo, i]() -> bool { + ts[i] = std::make_unique<TestThread>([vmo, i]() -> bool { return check_buffer(vmo, i, 1, true); }); ASSERT_TRUE(ts[i]->Start()); @@ -1328,7 +1328,7 @@ bool overlap_commit_supply_test() { fbl::unique_ptr<TestThread> tsA[kNumPages / kCommitLenA]; for (unsigned i = 0; i < fbl::count_of(tsA); i++) { - tsA[i] = fbl::make_unique<TestThread>([vmo, i]() -> bool { + tsA[i] = std::make_unique<TestThread>([vmo, i]() -> bool { return vmo->Commit(i * kCommitLenA, kCommitLenA); }); @@ -1338,7 +1338,7 @@ bool overlap_commit_supply_test() { fbl::unique_ptr<TestThread> tsB[kNumPages / kCommitLenB]; for (unsigned i = 0; i < fbl::count_of(tsB); i++) { - tsB[i] = fbl::make_unique<TestThread>([vmo, i]() -> bool { + tsB[i] = std::make_unique<TestThread>([vmo, i]() -> bool { return vmo->Commit(i * kCommitLenB, kCommitLenB); }); @@ -1404,7 +1404,7 @@ bool multicommit_supply_test() { fbl::unique_ptr<TestThread> ts[kNumCommits]; for (unsigned i = 0; i < kNumCommits; i++) { - ts[i] = fbl::make_unique<TestThread>([vmo, i]() -> bool { + ts[i] = std::make_unique<TestThread>([vmo, i]() -> bool { return vmo->Commit(i * kNumSupplies, kNumSupplies); }); ASSERT_TRUE(ts[i]->Start()); diff --git a/zircon/system/utest/core/pager/userpager.cpp b/zircon/system/utest/core/pager/userpager.cpp index 080e7e1ff6997712443cc83481e59c790ee878d6..72e62c186dd8b12327eb53dc8ce1df106ac212e6 100644 --- a/zircon/system/utest/core/pager/userpager.cpp +++ b/zircon/system/utest/core/pager/userpager.cpp @@ -250,7 +250,7 @@ bool UserPager::WaitForRequest(fbl::Function<bool(const zx_port_packet_t& packet return true; } - auto req = fbl::make_unique<request>(); + auto req = std::make_unique<request>(); req->req = actual_packet; requests_.push_front(std::move(req)); } else { diff --git a/zircon/system/utest/fbl/function_tests.cpp b/zircon/system/utest/fbl/function_tests.cpp index 17189370de61431535f0cca930b0f9ae9622bc15..b14fa76e3d1c72f135f742cc4d452b63111754c6 100644 --- a/zircon/system/utest/fbl/function_tests.cpp +++ b/zircon/system/utest/fbl/function_tests.cpp @@ -604,7 +604,7 @@ bool bind_member() { BEGIN_TEST; Obj obj; - auto move_only_value = fbl::make_unique<int>(4); + auto move_only_value = std::make_unique<int>(4); BindMember(&obj, &Obj::Call)(); EXPECT_EQ(23, BindMember(&obj, &Obj::AddOne)(22)); diff --git a/zircon/system/utest/fbl/unique_ptr_tests.cpp b/zircon/system/utest/fbl/unique_ptr_tests.cpp index 4ef228e139d88c1f2995522446cefe613b5a8c3f..c46b5229dbe037e5a1601e77ddf0de67724aba89 100644 --- a/zircon/system/utest/fbl/unique_ptr_tests.cpp +++ b/zircon/system/utest/fbl/unique_ptr_tests.cpp @@ -572,7 +572,7 @@ static bool uptr_test_make_unique() { // no alloc checker destroy_count = 0; { - CountingPtr ptr = fbl::make_unique<DeleteCounter>(42); + CountingPtr ptr = std::make_unique<DeleteCounter>(42); EXPECT_EQ(42, ptr->value, "value"); } EXPECT_EQ(1, destroy_count); @@ -598,7 +598,7 @@ static bool uptr_test_make_unique_array() { // no alloc checker destroy_count = 0; { - CountingArrPtr ptr = fbl::make_unique<DeleteCounter[]>(array_size); + CountingArrPtr ptr = std::make_unique<DeleteCounter[]>(array_size); EXPECT_NONNULL(ptr); for (size_t i = 0; i < array_size; ++i) { EXPECT_EQ(0, ptr[i].value); diff --git a/zircon/system/utest/fs-vnode/teardown-tests.cpp b/zircon/system/utest/fs-vnode/teardown-tests.cpp index ebf29b0fcab08eb3dbe594f8ab81575afb131c68..4ebd6fb00bb4adeeff3d6e8cc0c631440bebdbba 100644 --- a/zircon/system/utest/fs-vnode/teardown-tests.cpp +++ b/zircon/system/utest/fs-vnode/teardown-tests.cpp @@ -110,7 +110,7 @@ bool send_sync(const zx::channel& client) { bool sync_start(sync_completion_t* completions, async::Loop* loop, fbl::unique_ptr<fs::ManagedVfs>* vfs) { BEGIN_HELPER; - *vfs = fbl::make_unique<fs::ManagedVfs>(loop->dispatcher()); + *vfs = std::make_unique<fs::ManagedVfs>(loop->dispatcher()); ASSERT_EQ(loop->StartThread(), ZX_OK); auto vn = fbl::AdoptRef(new AsyncTearDownVnode(completions)); @@ -260,7 +260,7 @@ bool TestTeardownSlowClone() { async::Loop loop(&kAsyncLoopConfigNoAttachToThread); sync_completion_t completions[3]; - auto vfs = fbl::make_unique<fs::ManagedVfs>(loop.dispatcher()); + auto vfs = std::make_unique<fs::ManagedVfs>(loop.dispatcher()); ASSERT_EQ(loop.StartThread(), ZX_OK); auto vn = fbl::AdoptRef(new AsyncTearDownVnode(completions)); @@ -318,7 +318,7 @@ bool TestSynchronousTeardown() { { // Tear down the VFS while the async loop is running. - auto vfs = fbl::make_unique<fs::SynchronousVfs>(loop.dispatcher()); + auto vfs = std::make_unique<fs::SynchronousVfs>(loop.dispatcher()); auto vn = fbl::AdoptRef(new FdCountVnode()); zx::channel server; ASSERT_EQ(zx::channel::create(0, &client, &server), ZX_OK); @@ -330,7 +330,7 @@ bool TestSynchronousTeardown() { { // Tear down the VFS while the async loop is not running. - auto vfs = fbl::make_unique<fs::SynchronousVfs>(loop.dispatcher()); + auto vfs = std::make_unique<fs::SynchronousVfs>(loop.dispatcher()); auto vn = fbl::AdoptRef(new FdCountVnode()); zx::channel server; ASSERT_EQ(zx::channel::create(0, &client, &server), ZX_OK); @@ -340,7 +340,7 @@ bool TestSynchronousTeardown() { { // Tear down the VFS with no active connections. - auto vfs = fbl::make_unique<fs::SynchronousVfs>(loop.dispatcher()); + auto vfs = std::make_unique<fs::SynchronousVfs>(loop.dispatcher()); } END_TEST; diff --git a/zircon/system/utest/inspect-vmo/inspect_tests.cpp b/zircon/system/utest/inspect-vmo/inspect_tests.cpp index 9866d1640aab21a17fc7a5fa19ac834fde8ccceb..8e888f857e90bd450783e4cbe7effeb86f8b97b4 100644 --- a/zircon/system/utest/inspect-vmo/inspect_tests.cpp +++ b/zircon/system/utest/inspect-vmo/inspect_tests.cpp @@ -18,7 +18,7 @@ bool CreateDeleteActive() { Object object; { - auto inspector = fbl::make_unique<Inspector>(); + auto inspector = std::make_unique<Inspector>(); object = inspector->CreateObject("object"); EXPECT_TRUE(object); Object child = object.CreateChild("child"); diff --git a/zircon/system/utest/inspect-vmo/state_tests.cpp b/zircon/system/utest/inspect-vmo/state_tests.cpp index abc94ab3fb27d9ad50f75608fc30e844720a0ddd..e4cb7354dbd6b3b140cf4289620acc2821f5ae3d 100644 --- a/zircon/system/utest/inspect-vmo/state_tests.cpp +++ b/zircon/system/utest/inspect-vmo/state_tests.cpp @@ -112,7 +112,7 @@ Snapshot SnapshotAndScan(const zx::vmo& vmo, } else { *allocated_blocks += 1; } - blocks->insert(fbl::make_unique<ScannedBlock>(index, block)); + blocks->insert(std::make_unique<ScannedBlock>(index, block)); }); } return snapshot; @@ -123,7 +123,7 @@ bool CreateIntMetric() { auto vmo = fzl::ResizeableVmoMapper::Create(4096, "test"); ASSERT_TRUE(vmo != nullptr); - auto heap = fbl::make_unique<Heap>(std::move(vmo)); + auto heap = std::make_unique<Heap>(std::move(vmo)); auto state = State::Create(std::move(heap)); IntMetric a = state->CreateIntMetric("a", 0, 0); @@ -178,7 +178,7 @@ bool CreateUintMetric() { auto vmo = fzl::ResizeableVmoMapper::Create(4096, "test"); ASSERT_TRUE(vmo != nullptr); - auto heap = fbl::make_unique<Heap>(std::move(vmo)); + auto heap = std::make_unique<Heap>(std::move(vmo)); auto state = State::Create(std::move(heap)); UintMetric a = state->CreateUintMetric("a", 0, 0); @@ -233,7 +233,7 @@ bool CreateDoubleMetric() { auto vmo = fzl::ResizeableVmoMapper::Create(4096, "test"); ASSERT_TRUE(vmo != nullptr); - auto heap = fbl::make_unique<Heap>(std::move(vmo)); + auto heap = std::make_unique<Heap>(std::move(vmo)); auto state = State::Create(std::move(heap)); DoubleMetric a = state->CreateDoubleMetric("a", 0, 0); @@ -288,7 +288,7 @@ bool CreateSmallProperties() { auto vmo = fzl::ResizeableVmoMapper::Create(4096, "test"); ASSERT_TRUE(vmo != nullptr); - auto heap = fbl::make_unique<Heap>(std::move(vmo)); + auto heap = std::make_unique<Heap>(std::move(vmo)); auto state = State::Create(std::move(heap)); Property a = state->CreateProperty("a", 0, "Hello", PropertyFormat::kUtf8); @@ -343,7 +343,7 @@ bool CreateLargeSingleExtentProperties() { auto vmo = fzl::ResizeableVmoMapper::Create(4096, "test"); ASSERT_TRUE(vmo != nullptr); - auto heap = fbl::make_unique<Heap>(std::move(vmo)); + auto heap = std::make_unique<Heap>(std::move(vmo)); auto state = State::Create(std::move(heap)); char input[] = "abcdefg"; @@ -411,7 +411,7 @@ bool CreateMultiExtentProperty() { auto vmo = fzl::ResizeableVmoMapper::Create(4096, "test"); ASSERT_TRUE(vmo != nullptr); - auto heap = fbl::make_unique<Heap>(std::move(vmo)); + auto heap = std::make_unique<Heap>(std::move(vmo)); auto state = State::Create(std::move(heap)); char input[] = "abcdefg"; @@ -473,7 +473,7 @@ bool SetSmallProperty() { auto vmo = fzl::ResizeableVmoMapper::Create(4096, "test"); ASSERT_TRUE(vmo != nullptr); - auto heap = fbl::make_unique<Heap>(std::move(vmo)); + auto heap = std::make_unique<Heap>(std::move(vmo)); auto state = State::Create(std::move(heap)); struct test_case { @@ -523,7 +523,7 @@ bool SetLargeProperty() { auto vmo = fzl::ResizeableVmoMapper::Create(4096, "test"); ASSERT_TRUE(vmo != nullptr); - auto heap = fbl::make_unique<Heap>(std::move(vmo)); + auto heap = std::make_unique<Heap>(std::move(vmo)); auto state = State::Create(std::move(heap)); char input[] = "abcdefg"; @@ -572,7 +572,7 @@ bool SetPropertyOutOfMemory() { auto vmo = fzl::ResizeableVmoMapper::Create(4096, "test"); ASSERT_TRUE(vmo != nullptr); - auto heap = fbl::make_unique<Heap>(std::move(vmo), 16 * 1024); + auto heap = std::make_unique<Heap>(std::move(vmo), 16 * 1024); auto state = State::Create(std::move(heap)); fbl::Vector<char> vec; @@ -602,7 +602,7 @@ bool CreateObjectHierarchy() { auto vmo = fzl::ResizeableVmoMapper::Create(4096, "test"); ASSERT_TRUE(vmo != nullptr); - auto heap = fbl::make_unique<Heap>(std::move(vmo)); + auto heap = std::make_unique<Heap>(std::move(vmo)); auto state = State::Create(std::move(heap)); Object root = state->CreateObject("objects", 0); @@ -693,7 +693,7 @@ bool TombstoneTest() { auto vmo = fzl::ResizeableVmoMapper::Create(4096, "test"); ASSERT_TRUE(vmo != nullptr); - auto heap = fbl::make_unique<Heap>(std::move(vmo)); + auto heap = std::make_unique<Heap>(std::move(vmo)); auto state = State::Create(std::move(heap)); fbl::unique_ptr<Object> requests; @@ -701,7 +701,7 @@ bool TombstoneTest() { // Root going out of scope causes a tombstone to be created, // but since requests is referencing it it will not be deleted. Object root = state->CreateObject("objects", 0); - requests = fbl::make_unique<Object>(root.CreateChild("requests")); + requests = std::make_unique<Object>(root.CreateChild("requests")); auto a = root.CreateIntMetric("a", 1); auto b = root.CreateUintMetric("b", 1); auto c = root.CreateDoubleMetric("c", 1); @@ -747,7 +747,7 @@ bool TombstoneCleanup() { auto vmo = fzl::ResizeableVmoMapper::Create(4096, "test"); ASSERT_TRUE(vmo != nullptr); - auto heap = fbl::make_unique<Heap>(std::move(vmo)); + auto heap = std::make_unique<Heap>(std::move(vmo)); auto state = State::Create(std::move(heap)); IntMetric metric = state->CreateIntMetric("a", 0, 0); @@ -852,7 +852,7 @@ bool MultithreadingTest() { auto vmo = fzl::ResizeableVmoMapper::Create(4096, "test"); ASSERT_TRUE(vmo != nullptr); - auto heap = fbl::make_unique<Heap>(std::move(vmo)); + auto heap = std::make_unique<Heap>(std::move(vmo)); auto state = State::Create(std::move(heap)); size_t per_thread_times_operation_count = 0; diff --git a/zircon/system/utest/libfzl/owned-vmo-mapper-tests.cpp b/zircon/system/utest/libfzl/owned-vmo-mapper-tests.cpp index a79c9c706ca76a460aba6bf00a66008502e15c08..bc4be50dce071b44a46752ea070aabcf9c906f5e 100644 --- a/zircon/system/utest/libfzl/owned-vmo-mapper-tests.cpp +++ b/zircon/system/utest/libfzl/owned-vmo-mapper-tests.cpp @@ -56,7 +56,7 @@ bool UncheckedCreateHelper(fbl::unique_ptr<fzl::OwnedVmoMapper>* out_mapper, } ASSERT_NONNULL(out_mapper); - auto mapper = fbl::make_unique<fzl::OwnedVmoMapper>(); + auto mapper = std::make_unique<fzl::OwnedVmoMapper>(); if (mapper->CreateAndMap(size, name, map_options, std::move(manager), cache_policy) == ZX_OK) { *out_mapper = std::move(mapper); } diff --git a/zircon/system/utest/logger/test.cpp b/zircon/system/utest/logger/test.cpp index 1fd09b8768298709c29bad4fdf7633f9ac3ceabb..0f99f2579d98ad8f7b98f2e2a62881d2c6d54def 100644 --- a/zircon/system/utest/logger/test.cpp +++ b/zircon/system/utest/logger/test.cpp @@ -52,7 +52,7 @@ public: ASSERT_NE(pipe2(pipefd_, O_NONBLOCK), -1, ""); zx::channel local, remote; ASSERT_EQ(ZX_OK, zx::channel::create(0, &local, &remote)); - logger_ = fbl::make_unique<logger::LoggerImpl>(std::move(remote), pipefd_[0]); + logger_ = std::make_unique<logger::LoggerImpl>(std::move(remote), pipefd_[0]); ASSERT_EQ(ZX_OK, logger_->Begin(loop_.dispatcher())); logger_handle_.reset(local.release()); logger_->set_error_handler([this](zx_status_t status) { diff --git a/zircon/system/utest/runtests-utils/log-exporter-test.cpp b/zircon/system/utest/runtests-utils/log-exporter-test.cpp index 6fbe414c6894e0e0e03a3ac7a0a07cf1fc215781..aa02c288890b6eb237e1f33ca44d2364977a010c 100644 --- a/zircon/system/utest/runtests-utils/log-exporter-test.cpp +++ b/zircon/system/utest/runtests-utils/log-exporter-test.cpp @@ -163,7 +163,7 @@ bool TestLog() { FILE* buf_file = fmemopen(buf, sizeof(buf), "w"); // start listener - auto log_listener = fbl::make_unique<LogExporter>(std::move(listener_request), buf_file); + auto log_listener = std::make_unique<LogExporter>(std::move(listener_request), buf_file); log_listener->set_error_handler([](zx_status_t status) { EXPECT_EQ(ZX_ERR_CANCELED, status); }); @@ -206,7 +206,7 @@ bool TestLogMany() { FILE* buf_file = fmemopen(buf, sizeof(buf), "w"); // start listener - auto log_listener = fbl::make_unique<LogExporter>(std::move(listener_request), buf_file); + auto log_listener = std::make_unique<LogExporter>(std::move(listener_request), buf_file); log_listener->set_error_handler([](zx_status_t status) { EXPECT_EQ(ZX_ERR_CANCELED, status); }); @@ -252,7 +252,7 @@ bool TestDroppedLogs() { FILE* buf_file = fmemopen(buf, sizeof(buf), "w"); // start listener - auto log_listener = fbl::make_unique<LogExporter>(std::move(listener_request), buf_file); + auto log_listener = std::make_unique<LogExporter>(std::move(listener_request), buf_file); log_listener->set_error_handler([](zx_status_t status) { EXPECT_EQ(ZX_ERR_CANCELED, status); });