mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-05-17 10:01:31 +00:00
Switch from auto_ptr to unique_ptr (#638)
This commit is contained in:
committed by
GitHub
parent
8250e83e61
commit
0a2c565aa9
@@ -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]))
|
||||
|
||||
Reference in New Issue
Block a user