diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Utils.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Utils.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Utils.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Utils.cpp index 8b17a4425f6..895c5bc8ad3 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Utils.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Utils.cpp @@ -34,7 +34,14 @@ TAO_PG::override_properties ( return; const CORBA::ULong old_length = properties.length (); - // const CORBA::ULong new_length = old_length; + + const CORBA::ULong new_length = + (num_overrides > old_length ? num_overrides : old_length); + + // Increase the length wholesale as much as possible. The idea is + // to keep the cost of the incremental growth that may occur below + // to a minimum. + properties.length (new_length); // @@ Slow O(n^2) operation. Note that it may be slower than O(n^2) // if the length of the property sequence must be increased |