AutoDeleter: add operator [] for ArrayDeleter
Change-Id: I015951053050b58e73fd71e4abb104a0755416f7 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2890 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com> Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
This commit is contained in:
parent
638f8647a6
commit
8301c4980b
@ -122,6 +122,11 @@ struct ArrayDeleter : AutoDeleter<C, ArrayDelete<C> >
|
||||
{
|
||||
ArrayDeleter() : AutoDeleter<C, ArrayDelete<C> >() {}
|
||||
ArrayDeleter(C *array) : AutoDeleter<C, ArrayDelete<C> >(array) {}
|
||||
|
||||
inline C& operator[](size_t index) const
|
||||
{
|
||||
return this->Get()[index];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user