summaryrefslogtreecommitdiff
path: root/src/fs/virtfs/virtfsdir.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-04-01 00:30:58 +0300
committerAndrei Karas <akaras@inbox.ru>2017-04-01 00:30:58 +0300
commit55e0c28be50b70d2b69dd805f249074b6c191ad2 (patch)
tree16c624c3fbc1fb42d2b526d8edce487a0e3f5651 /src/fs/virtfs/virtfsdir.cpp
parentef151a7e96c9339660590bf908825c5f42d7d2f3 (diff)
downloadplus-55e0c28be50b70d2b69dd805f249074b6c191ad2.tar.gz
plus-55e0c28be50b70d2b69dd805f249074b6c191ad2.tar.bz2
plus-55e0c28be50b70d2b69dd805f249074b6c191ad2.tar.xz
plus-55e0c28be50b70d2b69dd805f249074b6c191ad2.zip
Fix compilation for android and fix code style.
Diffstat (limited to 'src/fs/virtfs/virtfsdir.cpp')
-rw-r--r--src/fs/virtfs/virtfsdir.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fs/virtfs/virtfsdir.cpp b/src/fs/virtfs/virtfsdir.cpp
index c3c2cad73..7f693b8ae 100644
--- a/src/fs/virtfs/virtfsdir.cpp
+++ b/src/fs/virtfs/virtfsdir.cpp
@@ -455,7 +455,7 @@ namespace VirtFsDir
const std::string &restrict filename,
int &restrict fileSize)
{
- VirtDirEntry *const dirEntry = static_cast<VirtDirEntry*>(entry);
+ const VirtDirEntry *const dirEntry = static_cast<VirtDirEntry*>(entry);
const std::string path = entry->root + filename;
if (Files::existsLocal(path) == false)
return nullptr;
@@ -493,9 +493,9 @@ namespace VirtFsDir
buffer[fileSize - 1] = 0;
#ifdef USE_FILE_FOPEN
- int cnt = fread(buffer, 1, fileSize, fd);
+ const int cnt = fread(buffer, 1, fileSize, fd);
#else // USE_FILE_FOPEN
- int cnt = ::read(fd, buffer, fileSize);
+ const int cnt = ::read(fd, buffer, fileSize);
#endif // USE_FILE_FOPEN
if (cnt <= 0)