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:
Samuel Williams
2017-09-15 01:22:47 +12:00
committed by Markus Tavenrath
parent bca6564dac
commit daae0b6194
2 changed files with 36 additions and 6 deletions

View File

@@ -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;
}