[ox/std] Make source_location::current only init if valid
All checks were successful
Build / build (push) Successful in 2m52s

This commit is contained in:
Gary Talent 2024-12-12 23:13:39 -06:00
parent e849e7a3dd
commit 28ebe93b77

View File

@ -40,7 +40,9 @@ class source_location {
static consteval source_location current(Raw const pSl = __builtin_source_location()) noexcept { static consteval source_location current(Raw const pSl = __builtin_source_location()) noexcept {
source_location sl; source_location sl;
sl.m_data = static_cast<__impl const*>(pSl); if (pSl) {
sl.m_data = static_cast<__impl const*>(pSl);
}
return sl; return sl;
} }