Skip to content
Snippets Groups Projects
Commit 9729617a authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: PtrList iterate over non-null entries (#2702)

- the iterator/const_iterator now skip any nullptr entries,
  which enables the following code to work even if the PtrList
  contains nullptr:

  for (const auto& intf : interfaces)
  {
      // Do something
      ...
  }

- this is a change in behaviour compared to OpenFOAM-v2212 and earlier,
  but is non-breaking:
  * Lists without null entries will traverse exactly as before.
  * Lists with null entries will now traverse correctly without
    provoking a FatalError.
parent afee861a
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment