From 0a2c565aa98fa7bc9623a753370e565fc5ed1e63 Mon Sep 17 00:00:00 2001 From: Christopher Bergqvist Date: Thu, 11 Jun 2020 18:02:28 +0200 Subject: Switch from auto_ptr to unique_ptr (#638) --- src/Common/BaseCom.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Common/BaseCom.cpp') diff --git a/src/Common/BaseCom.cpp b/src/Common/BaseCom.cpp index 7a74e293..32859b11 100644 --- a/src/Common/BaseCom.cpp +++ b/src/Common/BaseCom.cpp @@ -130,7 +130,7 @@ DWORD BaseCom::ReadWriteFile (BOOL write, BOOL device, BSTR filePath, BSTR *buff { try { - auto_ptr file (device ? new Device (filePath, !write) : new File (filePath, !write)); + unique_ptr file (device ? new Device (filePath, !write) : new File (filePath, !write)); file->CheckOpened (SRC_POS); file->SeekAt (offset); @@ -194,7 +194,7 @@ DWORD BaseCom::DeviceIoControl (BOOL readOnly, BOOL device, BSTR filePath, DWORD { try { - auto_ptr file (device ? new Device (filePath, readOnly == TRUE) : new File (filePath, readOnly == TRUE)); + unique_ptr file (device ? new Device (filePath, readOnly == TRUE) : new File (filePath, readOnly == TRUE)); file->CheckOpened (SRC_POS); if (!file->IoCtl (dwIoControlCode, (BYTE *) input, !(BYTE *) input ? 0 : ((DWORD *) ((BYTE *) input))[-1], (BYTE *) *output, !(BYTE *) *output ? 0 : ((DWORD *) ((BYTE *) *output))[-1])) -- cgit v1.2.3