mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-15 09:26:33 +00:00
Replace StringUtils::format in components/sceneutil
This commit is contained in:
parent
26e562490f
commit
924d591158
1 changed files with 4 additions and 6 deletions
|
@ -1,10 +1,10 @@
|
||||||
#include "animblendrules.hpp"
|
#include "animblendrules.hpp"
|
||||||
|
|
||||||
|
#include <format>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include <components/misc/strings/algorithm.hpp>
|
#include <components/misc/strings/algorithm.hpp>
|
||||||
#include <components/misc/strings/format.hpp>
|
|
||||||
#include <components/misc/strings/lower.hpp>
|
#include <components/misc/strings/lower.hpp>
|
||||||
|
|
||||||
#include <components/debug/debuglog.hpp>
|
#include <components/debug/debuglog.hpp>
|
||||||
|
@ -68,8 +68,7 @@ namespace SceneUtil
|
||||||
|
|
||||||
if (!root.IsDefined() || root.IsNull() || root.IsScalar())
|
if (!root.IsDefined() || root.IsNull() || root.IsScalar())
|
||||||
{
|
{
|
||||||
Log(Debug::Error) << Misc::StringUtils::format(
|
Log(Debug::Error) << "Can't parse file '" << configPath << "'. Check that it's a valid YAML/JSON file.";
|
||||||
"Can't parse file '%s'. Check that it's a valid YAML/JSON file.", configPath);
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,12 +103,11 @@ namespace SceneUtil
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw std::domain_error(
|
throw std::domain_error(std::format("'blending_rules' object not found in '{}' file!", configPath.value()));
|
||||||
Misc::StringUtils::format("'blending_rules' object not found in '%s' file!", configPath));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no rules then dont allocate any instance
|
// If no rules then dont allocate any instance
|
||||||
if (rules.size() == 0)
|
if (rules.empty())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
return new AnimBlendRules(rules);
|
return new AnimBlendRules(rules);
|
||||||
|
|
Loading…
Reference in a new issue