non-copy (by reference) retrival of getFields()/getPVFields()/getFieldNames()

This commit is contained in:
Matej Sekoranja committed 2015-01-30 11:35:43 +01:00
1 parent e39346d51e
commit 4acf7edf95
8 files changed
+24 -24

No files matched your search

+4 -4
View File
@@ -989,8 +989,8 @@ StructureConstPtr FieldCreate::appendField(
string const & fieldName,
FieldConstPtr const & field) const
{
StringArray oldNames = structure->getFieldNames();
FieldConstPtrArray oldFields = structure->getFields();
StringArray const & oldNames = structure->getFieldNames();
FieldConstPtrArray const & oldFields = structure->getFields();
size_t oldLen = oldNames.size();
StringArray newNames(oldLen+1);
FieldConstPtrArray newFields(oldLen+1);
@@ -1008,8 +1008,8 @@ StructureConstPtr FieldCreate::appendFields(
StringArray const & fieldNames,
FieldConstPtrArray const & fields) const
{
StringArray oldNames = structure->getFieldNames();
FieldConstPtrArray oldFields = structure->getFields();
StringArray const & oldNames = structure->getFieldNames();
FieldConstPtrArray const & oldFields = structure->getFields();
size_t oldLen = oldNames.size();
size_t extra = fieldNames.size();
StringArray newNames(oldLen+extra);