Warning fixes

This commit is contained in:
Nekotekina 2022-09-13 16:08:55 +03:00 committed by Ivan
parent e7fd84e031
commit b49a1f27eb
63 changed files with 165 additions and 208 deletions

View file

@ -317,7 +317,8 @@ std::string vfs::get(std::string_view vpath, std::vector<std::string>* out_dir,
// Handle /host_root (not escaped, not processed)
if (out_path)
{
*out_path = "/";
out_path->clear();
*out_path += '/';
*out_path += fmt::merge(name_list, "/");
*out_path += vpath;
}
@ -339,7 +340,8 @@ std::string vfs::get(std::string_view vpath, std::vector<std::string>* out_dir,
// Merge path fragments
if (out_path)
{
*out_path = "/";
out_path->clear();
*out_path += '/';
*out_path += fmt::merge(name_list, "/");
}
@ -389,7 +391,7 @@ std::string vfs::retrieve(std::string_view path, const vfs_directory* node, std:
return vfs::retrieve(rpath, &table.root, &mount_path_empty);
}
mount_path->emplace_back();
// Try to extract host root mount point name (if exists)
@ -456,7 +458,8 @@ std::string vfs::retrieve(std::string_view path, const vfs_directory* node, std:
{
// If failed to find mount point for path and /host_root is mounted
// Prepend "/host_root" to path and return the constructed string
result = "/";
result.clear();
result += '/';
for (const auto& name : *mount_path)
{