get rid of unnecessary copies for StringArray

This commit is contained in:
Marty Kraimer
2012-10-29 13:32:34 -04:00
parent 51abc5032c
commit 1d3c4d1762
8 changed files with 3684 additions and 37 deletions
+2 -3
View File
@@ -91,14 +91,13 @@ bool PVEnumerated::choicesMutable()
return pvChoices->isImmutable();
}
StringArray PVEnumerated:: getChoices()
StringArrayPtr const & PVEnumerated:: getChoices()
{
if(pvIndex.get()==NULL ) {
throw std::logic_error(notAttached);
}
StringArrayData data;
pvChoices->get(0,pvChoices->getLength(),data);
return data.data;
return pvChoices->getSharedVector();
}
int32 PVEnumerated::getNumberChoices()