summaryrefslogtreecommitdiff
path: root/indra/llfilesystem
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llfilesystem')
-rw-r--r--indra/llfilesystem/lldir.cpp8
-rw-r--r--indra/llfilesystem/lldiskcache.cpp4
-rw-r--r--indra/llfilesystem/llfilesystem.cpp7
3 files changed, 10 insertions, 9 deletions
diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp
index 8ee2c309a5..a18dc0a4f1 100644
--- a/indra/llfilesystem/lldir.cpp
+++ b/indra/llfilesystem/lldir.cpp
@@ -201,15 +201,15 @@ U32 LLDir::deleteDirAndContents(const std::string& dir_name)
boost::filesystem::path dir_path(dir_name);
#endif
- if (boost::filesystem::exists (dir_path))
+ if (boost::filesystem::exists(dir_path))
{
- if (!boost::filesystem::is_empty (dir_path))
+ if (!boost::filesystem::is_empty(dir_path))
{ // Directory has content
- num_deleted = boost::filesystem::remove_all (dir_path);
+ num_deleted = (U32)boost::filesystem::remove_all(dir_path);
}
else
{ // Directory is empty
- boost::filesystem::remove (dir_path);
+ boost::filesystem::remove(dir_path);
}
}
}
diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp
index da2e960ed3..86b1e2ac81 100644
--- a/indra/llfilesystem/lldiskcache.cpp
+++ b/indra/llfilesystem/lldiskcache.cpp
@@ -325,8 +325,8 @@ const std::string LLDiskCache::getCacheInfo()
{
std::ostringstream cache_info;
- F32 max_in_mb = (F32)mMaxSizeBytes / (1024.0 * 1024.0);
- F32 percent_used = ((F32)dirFileSize(mCacheDir) / (F32)mMaxSizeBytes) * 100.0;
+ F32 max_in_mb = (F32)mMaxSizeBytes / (1024.0f * 1024.0f);
+ F32 percent_used = ((F32)dirFileSize(mCacheDir) / (F32)mMaxSizeBytes) * 100.0f;
cache_info << std::fixed;
cache_info << std::setprecision(1);
diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp
index 235aae0be3..7d2a6bd6f5 100644
--- a/indra/llfilesystem/llfilesystem.cpp
+++ b/indra/llfilesystem/llfilesystem.cpp
@@ -79,6 +79,7 @@ LLFileSystem::~LLFileSystem()
// static
bool LLFileSystem::getExists(const LLUUID& file_id, const LLAssetType::EType file_type)
{
+ LL_PROFILE_ZONE_SCOPED;
std::string id_str;
file_id.toString(id_str);
const std::string extra_info = "";
@@ -147,7 +148,7 @@ S32 LLFileSystem::getFileSize(const LLUUID& file_id, const LLAssetType::EType fi
if (file.is_open())
{
file.seekg(0, std::ios::end);
- file_size = file.tellg();
+ file_size = (S32)file.tellg();
}
return file_size;
@@ -175,7 +176,7 @@ bool LLFileSystem::read(U8* buffer, S32 bytes)
}
else
{
- mBytesRead = file.gcount();
+ mBytesRead = (S32)file.gcount();
}
file.close();
@@ -216,7 +217,7 @@ bool LLFileSystem::write(const U8* buffer, S32 bytes)
{
ofs.write((const char*)buffer, bytes);
- mPosition = ofs.tellp(); // <FS:Ansariel> Fix asset caching
+ mPosition = (S32)ofs.tellp(); // <FS:Ansariel> Fix asset caching
success = true;
}