Fix bug with enum class in event
This commit is contained in:
@@ -31,7 +31,7 @@ namespace OpenVulkano
|
||||
|
||||
public:
|
||||
// Keep this in sync with all implementations! synctag: NamedEventProcessor_Parameters_SYNC_TAG
|
||||
typedef std::variant<std::string, bool, int, float, double, UUID> Parameters;
|
||||
typedef std::variant<std::string, bool, int, uint32_t, float, double, UUID> Parameters;
|
||||
|
||||
static bool HasProcessor() { return !processors.empty(); }
|
||||
|
||||
@@ -237,8 +237,8 @@ namespace OpenVulkano
|
||||
{
|
||||
std::vector<INamedEventProcessor::Parameters> attributes;
|
||||
attributes.reserve(sizeof...(Arguments));
|
||||
if constexpr (!std::conjunction_v<std::is_enum<std::remove_reference_t<Arguments>>...>)
|
||||
{
|
||||
if constexpr (!std::disjunction_v<std::is_enum<std::remove_reference_t<Arguments>>...>)
|
||||
{ // Express if no enum class is contained in the arguments
|
||||
(attributes.emplace_back(args), ...);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace OpenVulkano
|
||||
{ std::type_index(typeid(std::string)), @encode(NSString*) },
|
||||
{ std::type_index(typeid(bool)), @encode(BOOL) },
|
||||
{ std::type_index(typeid(int)), @encode(int) },
|
||||
{ std::type_index(typeid(uint32_t)), @encode(uint32_t) },
|
||||
{ std::type_index(typeid(float)), @encode(float) },
|
||||
{ std::type_index(typeid(double)), @encode(double) },
|
||||
{ std::type_index(typeid(UUID)), @encode(NSUUID*) }
|
||||
@@ -35,6 +36,7 @@ namespace OpenVulkano
|
||||
NSString* string;
|
||||
BOOL boolean;
|
||||
int integer;
|
||||
uint32_t uinteger;
|
||||
float fp32;
|
||||
double fp64;
|
||||
NSUUID* uuid;
|
||||
|
||||
Reference in New Issue
Block a user