OSDN Git Service

C++11のauto, nullptrを導入。
[tpi/lychee.git] / src / common / handle / TPIHandle.cpp
index db087a8..38a6225 100644 (file)
@@ -43,7 +43,7 @@
 //    Class (TPIHandle)\r
 //******************************************************************************\r
 \r
-TPIHandle::TPIHandle(void) : nErrorCode(TPI_ERROR_SUCCESS), bHandleOnCommand(1), archive(NULL)\r
+TPIHandle::TPIHandle(void) : nErrorCode(TPI_ERROR_SUCCESS), bHandleOnCommand(1), archive(nullptr)\r
 {\r
 }\r
 \r
@@ -79,10 +79,10 @@ bool TPIHandle::FreeLibrary(void)
        }\r
 \r
        GetAPIAddress("FreePlugin", p);\r
-       this->nErrorCode = ((int (__stdcall *)(void *)) p)(NULL);\r
+       this->nErrorCode = ((int (__stdcall *)(void *)) p)(nullptr);\r
 \r
        this->lib.Unload();\r
-       this->archive = NULL;\r
+       this->archive = nullptr;\r
        return this->nErrorCode == TPI_ERROR_SUCCESS;\r
 }\r
 \r
@@ -122,7 +122,7 @@ bool TPIHandle::GetFormatInformation(TPI_FORMATINFO * _fiInfo, bool _bFirst)
        _fiInfo->szTPIName.Empty();\r
        _fiInfo->eSupportedCommand = 0;\r
        _fiInfo->nTypeId           = 0;\r
-       _fiInfo->pCustomInfo    = NULL;\r
+       _fiInfo->pCustomInfo    = nullptr;\r
 \r
        GetAPIAddress("GetFormatInformation", p);\r
        this->nErrorCode = ((int (__stdcall *)(TPI_FORMATINFO *, bool)) p)(_fiInfo, _bFirst);\r
@@ -139,14 +139,14 @@ bool TPIHandle::OpenArchive(const wxString & _szArcName, wxULongLong_t * _llFile
 \r
 bool TPIHandle::CloseArchive(void)\r
 {\r
-       if (this->archive == NULL)\r
+       if (this->archive == nullptr)\r
        {\r
                return false;\r
        }\r
        this->nErrorCode = TPI_ERROR_SUCCESS;\r
        GetAPIAddress("CloseArchive", p);\r
        this->nErrorCode = ((int (__stdcall *)(void *)) p)(this->archive);\r
-       this->archive = NULL;\r
+       this->archive = nullptr;\r
        return this->nErrorCode == TPI_ERROR_SUCCESS;\r
 }\r
 \r
@@ -177,7 +177,7 @@ bool TPIHandle::GetFileInformation(TPI_FILEINFO * _fiInfo, bool _bFirst)
        _fiInfo->szUser.Empty();\r
        _fiInfo->szGroup.Empty();\r
        _fiInfo->nFileId        = 0;\r
-       _fiInfo->pCustomInfo    = NULL;\r
+       _fiInfo->pCustomInfo    = nullptr;\r
 \r
        GetAPIAddress("GetFileInformation", p);\r
        this->nErrorCode = ((int (__stdcall *)(void *, TPI_FILEINFO *, bool)) p)(this->archive, _fiInfo, _bFirst);\r
@@ -213,7 +213,7 @@ bool TPIHandle::GetArchiveInformation(TPI_ARCHIVEINFO * _aiInfo)
        _aiInfo->fnArchive.Clear();\r
        _aiInfo->szComment.Empty();\r
        _aiInfo->wCompressRatio = 0;\r
-       _aiInfo->pCustomInfo    = NULL;\r
+       _aiInfo->pCustomInfo    = nullptr;\r
        // FORMATINFO\r
        _aiInfo->fiInfo.fComment           = false;\r
        _aiInfo->fiInfo.fCompressHeader    = false;\r
@@ -233,7 +233,7 @@ bool TPIHandle::GetArchiveInformation(TPI_ARCHIVEINFO * _aiInfo)
        _aiInfo->fiInfo.szTPIName.Empty();\r
        _aiInfo->fiInfo.eSupportedCommand = 0;\r
        _aiInfo->fiInfo.nTypeId           = 0;\r
-       _aiInfo->fiInfo.pCustomInfo    = NULL;\r
+       _aiInfo->fiInfo.pCustomInfo    = nullptr;\r
 \r
        GetAPIAddress("GetArchiveInformation", p);\r
        this->nErrorCode = ((int (__stdcall *)(void *, TPI_ARCHIVEINFO *)) p)(this->archive, _aiInfo);\r