Split error macro into two versions (format vs non-formating) to allow format checking at compile-time
This commit is contained in:
@@ -107,7 +107,7 @@ aiFile* StreamOpener(aiFileIO* fileIO, const char* filePath, const char* openMod
|
||||
}
|
||||
else
|
||||
{
|
||||
NazaraError("unhandled/invalid openmode: {0} for file {1}", openMode, filePath);
|
||||
NazaraErrorFmt("unhandled/invalid openmode: {0} for file {1}", openMode, filePath);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ bool FindSkeletonRoot(SceneInfo& sceneInfo, const aiNode* node)
|
||||
auto range = sceneInfo.nodeByName.equal_range(node->mName.C_Str());
|
||||
if (std::distance(range.first, range.second) != 1)
|
||||
{
|
||||
NazaraError("failed to identify skeleton root node: {0} node(s) matched", std::distance(range.first, range.second));
|
||||
NazaraErrorFmt("failed to identify skeleton root node: {0} node(s) matched", std::distance(range.first, range.second));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ Nz::Result<std::shared_ptr<Nz::Animation>, Nz::ResourceLoadingError> LoadAnimati
|
||||
|
||||
if (!scene)
|
||||
{
|
||||
NazaraError("Assimp failed to import file: {0}", aiGetErrorString());
|
||||
NazaraErrorFmt("Assimp failed to import file: {0}", aiGetErrorString());
|
||||
return Nz::Err(Nz::ResourceLoadingError::DecodingError);
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ Nz::Result<std::shared_ptr<Nz::Animation>, Nz::ResourceLoadingError> LoadAnimati
|
||||
std::size_t jointIndex = parameters.skeleton->GetJointIndex(nodeAnim->mNodeName.C_Str());
|
||||
if (jointIndex == Nz::Skeleton::InvalidJointIndex)
|
||||
{
|
||||
NazaraError("animation references joint {0} which is not part of the skeleton", nodeAnim->mNodeName.C_Str());
|
||||
NazaraErrorFmt("animation references joint {0} which is not part of the skeleton", nodeAnim->mNodeName.C_Str());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -815,7 +815,7 @@ Nz::Result<std::shared_ptr<Nz::Mesh>, Nz::ResourceLoadingError> LoadMesh(Nz::Str
|
||||
|
||||
if (!scene)
|
||||
{
|
||||
NazaraError("Assimp failed to import file: {0}", aiGetErrorString());
|
||||
NazaraErrorFmt("Assimp failed to import file: {0}", aiGetErrorString());
|
||||
return Nz::Err(Nz::ResourceLoadingError::DecodingError);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user