use std forward
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 28s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 27s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 26s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 30s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 27s
Bigfoot / Clang Format Checks (push) Successful in 10s

This commit is contained in:
2026-02-03 15:13:51 +01:00
parent b2f3b095be
commit 6317604bd2
3 changed files with 6 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ class EngineAssertHandler
{ {
BIGFOOT_LOG_FATAL(ENGINE_LOGGER, BIGFOOT_LOG_FATAL(ENGINE_LOGGER,
"Assert: {} (File:{}, Line:{}, Function:{}\n{}", "Assert: {} (File:{}, Line:{}, Function:{}\n{}",
std::format(p_format, eastl::forward<ARGS>(p_args)...), std::format(p_format, std::forward<ARGS>(p_args)...),
p_location.file_name(), p_location.file_name(),
p_location.line(), p_location.line(),
p_location.function_name(), p_location.function_name(),

View File

@@ -45,7 +45,7 @@ class SystemAssertHandler
{ {
BIGFOOT_LOG_FATAL(SYSTEM_LOGGER, BIGFOOT_LOG_FATAL(SYSTEM_LOGGER,
"Assert: {} (File:{}, Line:{}, Function:{}\n{}", "Assert: {} (File:{}, Line:{}, Function:{}\n{}",
std::format(p_format, eastl::forward<ARGS>(p_args)...), std::format(p_format, std::forward<ARGS>(p_args)...),
p_location.file_name(), p_location.file_name(),
p_location.line(), p_location.line(),
p_location.function_name(), p_location.function_name(),

View File

@@ -43,7 +43,7 @@ class Singleton
*/ */
static constexpr bool HasInstance() static constexpr bool HasInstance()
{ {
return ms_initialized; return ms_instance.has_value();
} }
class Lifetime class Lifetime
@@ -54,11 +54,10 @@ class Singleton
* *
* \param p_args Arguments for the singleton * \param p_args Arguments for the singleton
*/ */
template<typename... ARGS, template<typename... ARGS>
typename = eastl::enable_if_t<!(eastl::is_same_v<Lifetime, eastl::decay_t<ARGS>> || ...)>>
explicit Lifetime(ARGS&&... p_args) explicit Lifetime(ARGS&&... p_args)
{ {
Initialize(eastl::forward<ARGS>(p_args)...); Initialize(std::forward<ARGS>(p_args)...);
} }
Lifetime(const Lifetime& p_lifetime) = delete; Lifetime(const Lifetime& p_lifetime) = delete;
@@ -89,7 +88,7 @@ class Singleton
template<typename... ARGS> template<typename... ARGS>
static void Initialize(ARGS&&... p_args) static void Initialize(ARGS&&... p_args)
{ {
ms_instance.emplace(eastl::forward<ARGS>(p_args)...); ms_instance.emplace(std::forward<ARGS>(p_args)...);
} }
/** /**