]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/vulkan/structurebuilder.h
Make StructureBuilder return const references to the pointers
[libs/gl.git] / source / backends / vulkan / structurebuilder.h
index f59153fd7ca5f0b4037163dd385e6595e42fa279..1cb1e8ce54b39dcce23407b423437b3c6ee00469 100644 (file)
@@ -23,11 +23,11 @@ public:
        StructureBuilder(std::vector<char> &, unsigned);
 
        template<typename T>
-       T *&add(std::size_t count = 1)
-       { return reinterpret_cast<T *&>(add(sizeof(T)*count, alignof(T))); }
+       T *const &add(std::size_t count = 1)
+       { return reinterpret_cast<T *const &>(add(sizeof(T)*count, alignof(T))); }
 
 private:
-       void *&add(std::size_t, std::size_t);
+       void *const &add(std::size_t, std::size_t);
 };
 
 } // namespace GL