diff options
author | chai <chaifix@163.com> | 2019-03-26 09:09:02 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-03-26 09:09:02 +0800 |
commit | d9041d6e12ded456c17622f7f2e7bbacb9e99b1a (patch) | |
tree | 6fd4febeb79b9b5efb5341ea352e05cd7752f5e8 /source/libs/asura-lib-utils/io/file.cpp | |
parent | 70f8aa8d1a3c15bd1eee3cdd88b9b9ce8970fae5 (diff) |
*misc
Diffstat (limited to 'source/libs/asura-lib-utils/io/file.cpp')
-rw-r--r-- | source/libs/asura-lib-utils/io/file.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/libs/asura-lib-utils/io/file.cpp b/source/libs/asura-lib-utils/io/file.cpp index 092a90d..976203d 100644 --- a/source/libs/asura-lib-utils/io/file.cpp +++ b/source/libs/asura-lib-utils/io/file.cpp @@ -38,7 +38,7 @@ namespace AsuraEngine throw Exception("Physfs is NOT initialized."); if (mode == FILE_MODE_CLOSED) - return; + return false; if (mode == FILE_MODE_READ && !PHYSFS_exists(mFileName.c_str())) throw Exception("Could NOT open file %s. Does not exist.", mFileName.c_str()); @@ -53,7 +53,7 @@ namespace AsuraEngine // Ѿ֮ǰͲٴµhandle if (mFileHandle != nullptr) - return; + return true; PHYSFS_getLastErrorCode(); @@ -83,7 +83,7 @@ namespace AsuraEngine mFileHandle = handle; mMode = mode; - if (mFileHandle != nullptr && !SetBuffer(mBufferMode,mBufferSize)) + if (mFileHandle && !SetBuffer(mBufferMode,mBufferSize)) { mBufferMode = BUFFER_MODE_NONE; mBufferSize = 0; |