Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 480
    • Issues 480
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #1775

cleanup of autoPtr, tmp classes

Should remove some slight inconsistencies between autoPtr and tmp, and reduce some coding verbosity.

  • For autoPtr, can use assignment from nullptr to effect a reset. Should also be allowed for tmp.
  • Reduce use of autoPtr empty() and valid() methods.

The autoPtr empty() method was introduced (Jan-2009) to reduce these types of constructs:

if (!myPtr.valid()) ...
if (myPtr.empty()) ...

But now there are some places with this type of thing:

if (!myPtr.empty()) ...

Since we now have an explicit bool operator, probably makes sense to use that instead:

if (myPtr) ...
if (!myPtr) ...
Edited Jul 15, 2020 by Mark OLESEN
Assignee
Assign to
Time tracking