Comments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #4072 (assigned defect)

Opened 9 years ago

Last modified 8 years ago

Change BasicArray::resize semantics

Reported by: wehart Owned by: jdsiiro
Priority: major Milestone: [long term]
Component: Source Code Version: 3.3
Keywords: Cc:

Description (last modified by jdsiiro) (diff)

Use the STL semantics. Have the second option specify the value that is used.

Create a new method, assign, which assigns values when it reinitializes.

/// Resizes the array to the given, nonnegative, value.
/// If the second argument is non-zero (the default), the old contents
/// are copied, and if the new array is longer, the new elements
/// are set with the \b initialize method.
virtual void resize(const size_type newl,int set_new_contents=1);


Change History

comment:1 Changed 9 years ago by jdsiiro

  • Description modified (diff)

(reformatting description)

Also, for reference:

comment:2 Changed 9 years ago by wehart

  • Milestone 4.1 deleted

comment:3 Changed 8 years ago by jdsiiro

  • Owner changed from wehart to jdsiiro
  • Status changed from new to assigned
  • Milestone set to [long term]

#1779 marked as a duplicate of this ticket (although it was asking for O(1) resize cost, which std::vector does not provide).


Add a comment

Modify Ticket

Change Properties
<Author field>
as assigned

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.