Hard-code size of bool as 1 just in case
This commit is contained in:
parent
8c0b371fdb
commit
ab028c9d7a
1 changed files with 3 additions and 0 deletions
|
|
@ -139,6 +139,9 @@ namespace pslang::types
|
||||||
{
|
{
|
||||||
return std::visit([]<typename T>(primitive_type_base<T> const &) -> std::size_t
|
return std::visit([]<typename T>(primitive_type_base<T> const &) -> std::size_t
|
||||||
{
|
{
|
||||||
|
// Just in case, check for bool explicitly
|
||||||
|
if constexpr (std::is_same_v<T, bool>)
|
||||||
|
return 1;
|
||||||
if constexpr (std::is_same_v<T, half_float>)
|
if constexpr (std::is_same_v<T, half_float>)
|
||||||
return 2;
|
return 2;
|
||||||
return sizeof(T);
|
return sizeof(T);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue