Switch Nazara to C++20
This commit is contained in:
@@ -167,19 +167,17 @@ namespace Nz
|
||||
for (auto&& rendererImpl : implementations)
|
||||
{
|
||||
#ifndef NAZARA_RENDERER_EMBEDDEDBACKENDS
|
||||
std::string fileNameStr = rendererImpl.fileName.generic_u8string();
|
||||
|
||||
DynLib implLib;
|
||||
if (!implLib.Load(rendererImpl.fileName))
|
||||
{
|
||||
NazaraWarning("Failed to load " + fileNameStr + ": " + implLib.GetLastError());
|
||||
NazaraWarningFmt("Failed to load {0}: {1}", rendererImpl.fileName, implLib.GetLastError());
|
||||
continue;
|
||||
}
|
||||
|
||||
CreateRendererImplFunc createRenderer = reinterpret_cast<CreateRendererImplFunc>(implLib.GetSymbol("NazaraRenderer_Instantiate"));
|
||||
if (!createRenderer)
|
||||
{
|
||||
NazaraDebug("Skipped " + fileNameStr + " (symbol not found)");
|
||||
NazaraDebug("Skipped {0} (NazaraRenderer_Instantiate symbol not found)", rendererImpl.fileName);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -194,7 +192,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
#ifndef NAZARA_RENDERER_EMBEDDEDBACKENDS
|
||||
NazaraDebug("Loaded " + fileNameStr);
|
||||
NazaraDebug("Loaded {0}", rendererImpl.fileName);
|
||||
chosenLib = std::move(implLib);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Nz
|
||||
std::shared_ptr<Texture> texture = params.renderDevice->InstantiateTexture(texParams, image.GetConstPixels(), params.buildMipmaps);
|
||||
|
||||
texture->SetFilePath(image.GetFilePath());
|
||||
if (std::string debugName = texture->GetFilePath().generic_u8string(); !debugName.empty())
|
||||
if (std::string debugName = PathToString(texture->GetFilePath()); !debugName.empty())
|
||||
texture->UpdateDebugName(debugName);
|
||||
|
||||
return texture;
|
||||
|
||||
Reference in New Issue
Block a user