Skip to content

Commit

Permalink
Formatting.
Browse files Browse the repository at this point in the history
Signed-off-by: Curtis Black <[email protected]>
  • Loading branch information
curtisblack committed Aug 25, 2023
1 parent 3006684 commit 3a0d66c
Showing 1 changed file with 16 additions and 47 deletions.
63 changes: 16 additions & 47 deletions src/include/OSL/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,128 +132,97 @@ template<typename TBuiltinArg> class ArgVariant {
return false;
}

template<typename T>
T get() const
template<typename T> T get() const
{
OSL_DASSERT(false);
return T();
}

template<>
inline TBuiltinArg
get() const
template<> inline TBuiltinArg get() const
{
OSL_DASSERT(is_holding<TBuiltinArg>());
return m_builtin;
}

template<>
inline bool
get() const
template<> inline bool get() const
{
OSL_DASSERT(is_holding<bool>());
return m_bool;
}

template<>
inline int8_t
get() const
template<> inline int8_t get() const
{
OSL_DASSERT(is_holding<int8_t>());
return m_int8;
}

template<>
inline int16_t
get() const
template<> inline int16_t get() const
{
OSL_DASSERT(is_holding<int16_t>());
return m_int16;
}

template<>
inline int32_t
get() const
template<> inline int32_t get() const
{
OSL_DASSERT(is_holding<int32_t>());
return m_int32;
}

template<>
inline int64_t
get() const
template<> inline int64_t get() const
{
OSL_DASSERT(is_holding<int64_t>());
return m_int64;
}

template<>
inline uint8_t
get() const
template<> inline uint8_t get() const
{
OSL_DASSERT(is_holding<uint8_t>());
return m_uint8;
}

template<>
inline uint16_t
get() const
template<> inline uint16_t get() const
{
OSL_DASSERT(is_holding<uint16_t>());
return m_uint16;
}

template<>
inline uint32_t
get() const
template<> inline uint32_t get() const
{
OSL_DASSERT(is_holding<uint32_t>());
return m_uint32;
}

template<>
inline uint64_t
get() const
template<> inline uint64_t get() const
{
OSL_DASSERT(is_holding<uint64_t>());
return m_uint64;
}

template<>
inline float
get() const
template<> inline float get() const
{
OSL_DASSERT(is_holding<float>());
return m_float;
}

template<>
inline double
get() const
template<> inline double get() const
{
OSL_DASSERT(is_holding<double>());
return m_double;
}

template<>
inline void*
get() const
template<> inline void* get() const
{
OSL_DASSERT(is_holding<void*>());
return m_ptr;
}

template<>
inline ustring
get() const
template<> inline ustring get() const
{
OSL_DASSERT(is_holding<ustring>());
return m_ustring;
}

template<>
inline ustringhash
get() const
template<> inline ustringhash get() const
{
OSL_DASSERT(is_holding<ustringhash>());
return m_ustringhash;
Expand Down

0 comments on commit 3a0d66c

Please sign in to comment.