1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-08-28 08:47:13 +00:00
parent 06f7cced2d
commit 4e753162c5

View file

@ -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.