summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-08 22:47:30 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-08 22:47:30 +0300
commit64aabf79b5a10bdf8192bb1048804a3e36730905 (patch)
treeab7f8a82228acd617ec178f04d7ca6bb09f727de /src/resources/resourcemanager.cpp
parent3f9d0c023f3d84de0c68dbf9f7c29aa1b0abb9c9 (diff)
downloadplus-64aabf79b5a10bdf8192bb1048804a3e36730905.tar.gz
plus-64aabf79b5a10bdf8192bb1048804a3e36730905.tar.bz2
plus-64aabf79b5a10bdf8192bb1048804a3e36730905.tar.xz
plus-64aabf79b5a10bdf8192bb1048804a3e36730905.zip
Fix code style in resources.
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r--src/resources/resourcemanager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 876d7b751..8ed5d52f1 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -215,7 +215,7 @@ bool ResourceManager::cleanOrphans(const bool always)
timeval tv;
gettimeofday(&tv, nullptr);
// Delete orphaned resources after 30 seconds.
- time_t oldest = tv.tv_sec;
+ time_t oldest = static_cast<time_t>(tv.tv_sec);
const time_t threshold = oldest - 30;
if (mOrphanedResources.empty() || (!always && mOldestOrphan >= threshold))
@@ -841,7 +841,7 @@ void ResourceManager::release(Resource *const res)
timeval tv;
gettimeofday(&tv, nullptr);
- const time_t timestamp = tv.tv_sec;
+ const time_t timestamp = static_cast<time_t>(tv.tv_sec);
res->mTimeStamp = timestamp;
if (mOrphanedResources.empty())
@@ -999,7 +999,7 @@ bool ResourceManager::copyFile(const std::string &restrict src,
}
const int fileSize = static_cast<const int>(PHYSFS_fileLength(srcFile));
- char *buf = new char[fileSize];
+ char *buf = new char[static_cast<size_t>(fileSize)];
PHYSFS_read(srcFile, buf, 1, fileSize);
PHYSFS_write(dstFile, buf, 1, fileSize);