If we use a vector unconditionally, any GetClass(declid) requires an allocation even though almost all of them return a single element. That's fairly inefficient. So the plan was to return fgMultipleClasses (aka -1) if the caller must provide a vector, but to handle the simple case without vector.

On March 25, 2014 1:01:39 AM CET, pcanal <notifications@github.com> wrote:
>> @@ -2866,6 +2940,34 @@ TClass *TClass::GetClass(ClassInfo_t *info,
>Bool_t load, Bool_t silent)
>>  }
>>  
>> 
>//______________________________________________________________________________
>> +TClass* TClass::GetClass(DeclId_t id, Bool_t load, Bool_t silent,
>std::vector<TClass*>* classes)
>> +{
>
>Wouldn't be simpler/clearer to 'only' return the result in the vector. 
>Currently if the result is 'zero' it might mean 'no class' or 'multiple
>class'.   
>I recommend the following simpler interface:
>   bool GetClass(DeclId_t id, std::vector<TClass*>& classes)
>
>(Since load and silent are not used, at least for now, I don't see a
>reason to introduce them)
>If you still with to have them to look like the other GetClass, then
>suppress the warning with Bool_t /* load */
>(To support GetClass(declid, vec, kTRUE /* load */) we will need to
>generate the name and call GetName(const char *) )
>
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/karies/root/pull/59/files#r10912564

===
short mobile;