Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • O OpenFOAM-plus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 339
    • Issues 339
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • OpenFOAM-plus
  • Merge requests
  • !152

Feature list methods

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Mark OLESEN requested to merge feature-list-methods into develop Oct 09, 2017
  • Overview 1
  • Commits 4
  • Changes 96

Various minor cleanups for lists:

  • simplifications and extension to DynamicList (issue #595 (closed)), notably reducing the number of template parameters and imposing instead a min allocation limit that avoids repeated re-allocation when resizing small lists. A small list has been arbitrarily defined as being 16 elements.

  • additional removal methods for DynamicList

  • find() and found() methods for list containers, which provide some symmetry with hash containers and std::string. The found() method may be easier to read. Eg,

    list.found(val) vs. (findIndex(list, val) != -1)

  • added move constructors and move assignment for various containers.

  • rebased edge on labelPair for more consistency with first/second access and to make sort/flip methods more generally available. Note that the current edge::end() has the misfortune of masking the underlying list iterators and thus prevents use of range-based fors with edges.

Edited Oct 11, 2017 by Mark OLESEN
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature-list-methods