Procházet zdrojové kódy

vfs: Replace cstr concat with char concat

Merry před 3 roky
rodič
revize
bee395d2f0
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      src/core/file_sys/vfs.cpp

+ 3 - 3
src/core/file_sys/vfs.cpp

@@ -194,9 +194,9 @@ std::size_t VfsFile::WriteBytes(const std::vector<u8>& data, std::size_t offset)
 
 std::string VfsFile::GetFullPath() const {
     if (GetContainingDirectory() == nullptr)
-        return "/" + GetName();
+        return '/' + GetName();
 
-    return GetContainingDirectory()->GetFullPath() + "/" + GetName();
+    return GetContainingDirectory()->GetFullPath() + '/' + GetName();
 }
 
 VirtualFile VfsDirectory::GetFileRelative(std::string_view path) const {
@@ -435,7 +435,7 @@ std::string VfsDirectory::GetFullPath() const {
     if (IsRoot())
         return GetName();
 
-    return GetParentDirectory()->GetFullPath() + "/" + GetName();
+    return GetParentDirectory()->GetFullPath() + '/' + GetName();
 }
 
 bool ReadOnlyVfsDirectory::IsWritable() const {