remove unnecessary try catch block
This commit is contained in:
@@ -88,21 +88,19 @@ namespace OpenVulkano::Scene
|
||||
|
||||
Array<char> FontAtlasFactory::FindFont(const std::string& fontIdentifier) const
|
||||
{
|
||||
try
|
||||
Array<char> resource = ResourceLoader::GetInstance().GetResource(fontIdentifier);
|
||||
if (resource.Empty())
|
||||
{
|
||||
return ResourceLoader::GetInstance().GetResource(fontIdentifier);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
if (!std::filesystem::exists(fontIdentifier))
|
||||
{
|
||||
if (!m_allowSystemFonts)
|
||||
if (!std::filesystem::exists(fontIdentifier))
|
||||
{
|
||||
return {};
|
||||
if (!m_allowSystemFonts)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
return Utils::ReadFile(SystemFontResolver::GetSystemFontPath(fontIdentifier), true);
|
||||
}
|
||||
return Utils::ReadFile(SystemFontResolver::GetSystemFontPath(fontIdentifier), true);
|
||||
return Utils::ReadFile(fontIdentifier);
|
||||
}
|
||||
return Utils::ReadFile(fontIdentifier);
|
||||
return resource;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user