mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Merge pull request #107 from asuessenbach/FixOptional
Added nullptr_t-constructor to ArrayProxy, simplifying handling of empty arrays.
This commit is contained in:
commit
954bc6a34e
@ -238,6 +238,11 @@ std::string const arrayProxyHeader = (
|
|||||||
" class ArrayProxy\n"
|
" class ArrayProxy\n"
|
||||||
" {\n"
|
" {\n"
|
||||||
" public:\n"
|
" public:\n"
|
||||||
|
" ArrayProxy(std::nullptr_t)\n"
|
||||||
|
" : m_count(0)\n"
|
||||||
|
" , m_ptr(nullptr)\n"
|
||||||
|
" {}\n"
|
||||||
|
"\n"
|
||||||
" ArrayProxy(T & ptr)\n"
|
" ArrayProxy(T & ptr)\n"
|
||||||
" : m_count(1)\n"
|
" : m_count(1)\n"
|
||||||
" , m_ptr(&ptr)\n"
|
" , m_ptr(&ptr)\n"
|
||||||
|
@ -220,6 +220,11 @@ namespace vk
|
|||||||
class ArrayProxy
|
class ArrayProxy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
ArrayProxy(std::nullptr_t)
|
||||||
|
: m_count(0)
|
||||||
|
, m_ptr(nullptr)
|
||||||
|
{}
|
||||||
|
|
||||||
ArrayProxy(T & ptr)
|
ArrayProxy(T & ptr)
|
||||||
: m_count(1)
|
: m_count(1)
|
||||||
, m_ptr(&ptr)
|
, m_ptr(&ptr)
|
||||||
|
Loading…
Reference in New Issue
Block a user