mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: fixup test applications
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.
|
||||
@ -165,24 +165,24 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Use predicate, or test() method
|
||||
|
||||
if (list2(1))
|
||||
if (list2.test(1))
|
||||
{
|
||||
Info<< "1 is on (original)" << nl;
|
||||
}
|
||||
if (!list2(2))
|
||||
if (!list2.test(2))
|
||||
{
|
||||
Info<< "2 is off (original)" << nl;
|
||||
}
|
||||
if (!list2(100))
|
||||
if (!list2.test(100))
|
||||
{
|
||||
Info<< "100 is off (original)" << nl;
|
||||
}
|
||||
|
||||
if (wrapper(1))
|
||||
if (wrapper.test(1))
|
||||
{
|
||||
Info<< "1 is on (wrapped)" << nl;
|
||||
}
|
||||
if (!wrapper(2))
|
||||
if (!wrapper.test(2))
|
||||
{
|
||||
Info<< "2 is off (wrapped)" << nl;
|
||||
}
|
||||
|
||||
@ -72,13 +72,13 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Is empty
|
||||
bool empty() const
|
||||
bool empty() const noexcept
|
||||
{
|
||||
return bits_.empty() && bools_.empty();
|
||||
}
|
||||
|
||||
//- Size
|
||||
label size() const
|
||||
label size() const noexcept
|
||||
{
|
||||
return bits_.size() + bools_.size();
|
||||
}
|
||||
@ -93,7 +93,7 @@ public:
|
||||
bool operator()(const label i) const
|
||||
{
|
||||
// Can also use test(i) etc...
|
||||
return bits_(i) || bools_(i);
|
||||
return bits_.test(i) || bools_.test(i);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user