mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-06 10:10:25 +02:00
Add non-const version of IVertexBuffer::operator[]
Yeah, setValue is not enough and if getLast() works then this should work as well (when users are very careful...) git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6345 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@ -26,6 +26,7 @@ namespace scene
|
||||
|
||||
virtual void push_back (const video::S3DVertex &element) =0;
|
||||
virtual void setValue(u32 index, const video::S3DVertex &value) =0;
|
||||
virtual video::S3DVertex& operator [](u32 index) = 0;
|
||||
virtual video::S3DVertex& operator [](const u32 index) const =0;
|
||||
virtual video::S3DVertex& getLast() =0;
|
||||
virtual void set_used(u32 usedNow) =0;
|
||||
@ -51,6 +52,9 @@ namespace scene
|
||||
virtual void setValue(u32 index, const video::S3DVertex &value) IRR_OVERRIDE
|
||||
{Vertices[index] = (T&)value;}
|
||||
|
||||
virtual video::S3DVertex& operator [](u32 index) IRR_OVERRIDE
|
||||
{return (video::S3DVertex&)Vertices[index];}
|
||||
|
||||
virtual video::S3DVertex& operator [](const u32 index) const IRR_OVERRIDE
|
||||
{return (video::S3DVertex&)Vertices[index];}
|
||||
|
||||
@ -158,6 +162,11 @@ namespace scene
|
||||
Vertices->setValue(index, value);
|
||||
}
|
||||
|
||||
virtual video::S3DVertex& operator [](u32 index) IRR_OVERRIDE
|
||||
{
|
||||
return (*Vertices)[index];
|
||||
}
|
||||
|
||||
virtual video::S3DVertex& operator [](const u32 index) const IRR_OVERRIDE
|
||||
{
|
||||
return (*Vertices)[index];
|
||||
|
Reference in New Issue
Block a user