mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-22 07:24:34 +00:00
Only fields need to be memset.
This commit is contained in:
parent
ad394dce69
commit
5140be1d4d
@ -37,7 +37,7 @@ namespace vkb {
|
||||
namespace detail {
|
||||
|
||||
GenericFeaturesPNextNode::GenericFeaturesPNextNode() {
|
||||
memset(this, UINT8_MAX, sizeof(GenericFeaturesPNextNode));
|
||||
memset(fields, UINT8_MAX, sizeof(VkBool32) * field_capacity);
|
||||
}
|
||||
|
||||
bool GenericFeaturesPNextNode::match(
|
||||
|
@ -120,10 +120,12 @@ template <typename T> class Result {
|
||||
|
||||
struct GenericFeaturesPNextNode {
|
||||
|
||||
static const uint32_t field_capacity = 256;
|
||||
|
||||
GenericFeaturesPNextNode();
|
||||
|
||||
template <typename T> GenericFeaturesPNextNode(T const& features) noexcept {
|
||||
memset(this, UINT8_MAX, sizeof(GenericFeaturesPNextNode));
|
||||
memset(fields, UINT8_MAX, sizeof(VkBool32) * field_capacity);
|
||||
memcpy(this, &features, sizeof(T));
|
||||
}
|
||||
|
||||
@ -131,7 +133,6 @@ struct GenericFeaturesPNextNode {
|
||||
|
||||
VkStructureType sType = static_cast<VkStructureType>(0);
|
||||
void* pNext = nullptr;
|
||||
static const uint32_t field_capacity = 256;
|
||||
VkBool32 fields[field_capacity];
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user