From 64aabf79b5a10bdf8192bb1048804a3e36730905 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 8 May 2014 22:47:30 +0300 Subject: Fix code style in resources. --- src/resources/resourcemanager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/resources/resourcemanager.cpp') 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(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(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(PHYSFS_fileLength(srcFile)); - char *buf = new char[fileSize]; + char *buf = new char[static_cast(fileSize)]; PHYSFS_read(srcFile, buf, 1, fileSize); PHYSFS_write(dstFile, buf, 1, fileSize); -- cgit v1.2.3-70-g09d2