mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-12-07 10:38:23 +00:00
Replace is_literal_type_v usage with is_pod_v
This commit is contained in:
parent
4be45e926c
commit
1569602dfa
@ -742,7 +742,7 @@ struct CVarTypeTraits
|
|||||||
{
|
{
|
||||||
m_TypeName = name;
|
m_TypeName = name;
|
||||||
m_ByteSize = sizeof( T );
|
m_ByteSize = sizeof( T );
|
||||||
m_IsPrimitive = std::is_literal_type_v<T>;
|
m_IsPrimitive = std::is_pod_v<T>;
|
||||||
|
|
||||||
Construct = &CvarTypeTrait_ConstructFn<T>;
|
Construct = &CvarTypeTrait_ConstructFn<T>;
|
||||||
Copy = &CvarTypeTrait_CopyFn<T>;
|
Copy = &CvarTypeTrait_CopyFn<T>;
|
||||||
@ -1298,7 +1298,7 @@ inline CUtlString ConVarRefAbstract::GetString( CSplitScreenSlot slot ) const
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
inline T ConVarRefAbstract::ConvertFromPrimitiveTo( CSplitScreenSlot slot ) const
|
inline T ConVarRefAbstract::ConvertFromPrimitiveTo( CSplitScreenSlot slot ) const
|
||||||
{
|
{
|
||||||
if constexpr(std::is_literal_type_v<T>)
|
if constexpr(std::is_pod_v<T>)
|
||||||
{
|
{
|
||||||
CVValue_t *value = m_ConVarData->ValueOrDefault( slot );
|
CVValue_t *value = m_ConVarData->ValueOrDefault( slot );
|
||||||
|
|
||||||
@ -1365,7 +1365,7 @@ template<> inline void ConVarRefAbstract::SetAs( CUtlString value, CSplitScreenS
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
inline void ConVarRefAbstract::ConvertToPrimitiveFrom( CSplitScreenSlot slot, T value ) const
|
inline void ConVarRefAbstract::ConvertToPrimitiveFrom( CSplitScreenSlot slot, T value ) const
|
||||||
{
|
{
|
||||||
if constexpr(std::is_literal_type_v<T>)
|
if constexpr(std::is_pod_v<T>)
|
||||||
{
|
{
|
||||||
switch(GetType())
|
switch(GetType())
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user