mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
assert that FName is a POD and as such is passed directly on registers, so that if it changes to be a non-pod, it won't silently break parameters
This commit is contained in:
parent
61d68eb2d6
commit
49eae74272
1 changed files with 2 additions and 1 deletions
|
@ -45,6 +45,7 @@
|
|||
#include "memarena.h"
|
||||
#include "name.h"
|
||||
#include "scopebarrier.h"
|
||||
#include <type_traits>
|
||||
|
||||
class DObject;
|
||||
union VMOP;
|
||||
|
@ -617,7 +618,7 @@ namespace
|
|||
template<typename T> struct native_is_valid<T&> { static const bool value = true; static const bool retval = true; };
|
||||
template<> struct native_is_valid<void> { static const bool value = true; static const bool retval = true; };
|
||||
template<> struct native_is_valid<int> { static const bool value = true; static const bool retval = true; };
|
||||
template<> struct native_is_valid<FName> { static const bool value = true; static const bool retval = true; static_assert(sizeof(FName) == sizeof(int)); };
|
||||
template<> struct native_is_valid<FName> { static const bool value = true; static const bool retval = true; static_assert(sizeof(FName) == sizeof(int)); static_assert(std::is_pod_v<FName>);};
|
||||
template<> struct native_is_valid<unsigned int> { static const bool value = true; static const bool retval = true; };
|
||||
template<> struct native_is_valid<double> { static const bool value = true; static const bool retval = true; };
|
||||
template<> struct native_is_valid<bool> { static const bool value = true; static const bool retval = false;}; // Bool as return does not work!
|
||||
|
|
Loading…
Reference in a new issue