mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
parent
06f7cced2d
commit
4e753162c5
1 changed files with 5 additions and 3 deletions
|
|
@ -161,9 +161,10 @@ public:
|
|||
inline ObjectClass* operator[] (const int index) const throw()
|
||||
{
|
||||
lock.enter();
|
||||
return (index >= 0 && index < numUsed) ? this->elements [index]
|
||||
: (ObjectClass*) 0;
|
||||
ObjectClass* const result = (index >= 0 && index < numUsed) ? this->elements [index]
|
||||
: (ObjectClass*) 0;
|
||||
lock.exit();
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Returns a pointer to the object at this index in the array, without checking whether the index is in-range.
|
||||
|
|
@ -175,8 +176,9 @@ public:
|
|||
{
|
||||
lock.enter();
|
||||
jassert (index >= 0 && index < numUsed);
|
||||
return this->elements [index];
|
||||
ObjectClass* const result = this->elements [index];
|
||||
lock.exit();
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Returns a pointer to the first object in the array.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue