VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/BaseCom.cpp
diff options
context:
space:
mode:
authorChristopher Bergqvist <chris@digitalpoetry.se>2020-06-11 18:02:28 +0200
committerGitHub <noreply@github.com>2020-06-11 18:02:28 +0200
commit0a2c565aa98fa7bc9623a753370e565fc5ed1e63 (patch)
treef89c65090af0da4ef3c1915ba797b9a2cda75f9c /src/Common/BaseCom.cpp
parent8250e83e6188dffd26d6310e36af3132d93412dd (diff)
downloadVeraCrypt-0a2c565aa98fa7bc9623a753370e565fc5ed1e63.tar.gz
VeraCrypt-0a2c565aa98fa7bc9623a753370e565fc5ed1e63.zip
Switch from auto_ptr to unique_ptr (#638)
Diffstat (limited to 'src/Common/BaseCom.cpp')
-rw-r--r--src/Common/BaseCom.cpp4
1 files changed, 2 insertions, 2 deletions
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> file (device ? new Device (filePath, !write) : new File (filePath, !write));
+ unique_ptr <File> 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> file (device ? new Device (filePath, readOnly == TRUE) : new File (filePath, readOnly == TRUE));
+ unique_ptr <File> 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]))