[ox/std] Make source_location::current only init if valid
All checks were successful
Build / build (push) Successful in 3m37s
All checks were successful
Build / build (push) Successful in 3m37s
This commit is contained in:
parent
4ccc6a7412
commit
fcac134af0
@ -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;
|
||||||
|
if (pSl) {
|
||||||
sl.m_data = static_cast<__impl const*>(pSl);
|
sl.m_data = static_cast<__impl const*>(pSl);
|
||||||
|
}
|
||||||
return sl;
|
return sl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user