Reduces string allocations in paths.

This commit is contained in:
Vladislav Belov
2025-10-05 01:11:03 +02:00
parent d22d8776e6
commit e63c80c613
8 changed files with 54 additions and 32 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ VfsPath GetBaseFilename(const VfsPath& filename)
if (!VfsFileExists(filePath))
throw std::runtime_error{fmt::format("The file \"{}\" does not exist.", filePath.string8())};
if (filePath.Extension().string8() != ".js")
if (filePath.Extension() != L".js")
{
throw std::runtime_error{fmt::format("The file \"{}\" is not a JavaScript module.",
filePath.string8())};