mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Add UniqueHandle non-const accessors, ensure all by reference. (#123)
* Add UniqueHandle non-const accessors, ensure all by reference. - Add `Type * operator->()` - Fix `Type get() const` to `const Type & get() const` - Add `Type & get()` * Add support for structure pointer chains was missing some generator code. * Update vulkan.hpp with changes.
This commit is contained in:
parent
bca6564dac
commit
daae0b6194
@ -381,8 +381,8 @@ const std::string structureChainHeader = R"(
|
||||
|
||||
StructureChain& operator=(StructureChain const &rhs)
|
||||
{
|
||||
linkAndCopy(rhs);
|
||||
return this;
|
||||
linkAndCopy<StructureElements...>(rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename ClassType> ClassType& get() { return static_cast<ClassType&>(*this);}
|
||||
@ -607,13 +607,28 @@ const std::string uniqueHandleHeader = R"(
|
||||
{
|
||||
return &m_value;
|
||||
}
|
||||
|
||||
|
||||
Type * operator->()
|
||||
{
|
||||
return &m_value;
|
||||
}
|
||||
|
||||
Type const& operator*() const
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
Type get() const
|
||||
Type & operator*()
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
const Type & get() const
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
Type & get()
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
@ -361,13 +361,28 @@ namespace vk
|
||||
{
|
||||
return &m_value;
|
||||
}
|
||||
|
||||
|
||||
Type * operator->()
|
||||
{
|
||||
return &m_value;
|
||||
}
|
||||
|
||||
Type const& operator*() const
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
Type get() const
|
||||
Type & operator*()
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
const Type & get() const
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
Type & get()
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user