FileSystem: Swap vector for DynamicHeapArray

No point zeroing it out.
This commit is contained in:
Stenzek
2024-08-25 22:13:18 +10:00
parent a2aa040987
commit 707453b596
32 changed files with 112 additions and 84 deletions

View File

@ -1950,10 +1950,10 @@ bool Host::ResourceFileExists(std::string_view filename, bool allow_override)
return FileSystem::FileExists(path.c_str());
}
std::optional<std::vector<u8>> Host::ReadResourceFile(std::string_view filename, bool allow_override)
std::optional<DynamicHeapArray<u8>> Host::ReadResourceFile(std::string_view filename, bool allow_override)
{
const std::string path = QtHost::GetResourcePath(filename, allow_override);
std::optional<std::vector<u8>> ret(FileSystem::ReadBinaryFile(path.c_str()));
std::optional<DynamicHeapArray<u8>> ret(FileSystem::ReadBinaryFile(path.c_str()));
if (!ret.has_value())
ERROR_LOG("Failed to read resource file '{}'", filename);
return ret;