Split error macro into two versions (format vs non-formating) to allow format checking at compile-time

This commit is contained in:
SirLynix
2023-11-02 15:18:03 +01:00
parent 8fb53f467b
commit 4b8a475bbd
133 changed files with 570 additions and 557 deletions

View File

@@ -2,11 +2,6 @@
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#ifdef NAZARA_BUILD
#include <fmt/format.h>
#include <fmt/std.h>
#endif
#include <Nazara/Core/Debug.hpp>
namespace Nz
@@ -23,8 +18,8 @@ namespace Nz
NAZARA_CORE_API std::string FormatFromStore(std::string_view str);
}
template<typename ...Args>
std::string Format(std::string_view str, Args&&... args)
template<typename... Args>
std::string Format(FormatString<Args...> str, Args&&... args)
{
#ifdef NAZARA_BUILD
return fmt::format(str, std::forward<Args>(args)...);