mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: relocate sortedOrder from ListOps.H to List.H
- commonly used, only depends on routines defined in UList (don't need the rest of ListOps for it). ENH: implement boolList::operator() const - allows use as a predicate functor, as per bitSet and labelHashSet GIT: combine SubList, UList into List directory (intertwined concepts) STYLE: default initialize DynamicList instead of with size 0
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -32,8 +32,8 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef bitSetOrBoolList_H
|
||||
#define bitSetOrBoolList_H
|
||||
#ifndef Foam_bitSetOrBoolList_H
|
||||
#define Foam_bitSetOrBoolList_H
|
||||
|
||||
#include "bitSet.H"
|
||||
#include "boolList.H"
|
||||
@ -88,6 +88,13 @@ public:
|
||||
{
|
||||
return bits_.test(i) || bools_.test(i);
|
||||
}
|
||||
|
||||
//- Test predicate
|
||||
bool operator()(const label i) const
|
||||
{
|
||||
// Can also use test(i) etc...
|
||||
return bits_(i) || bools_(i);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user