STYLE: remove unneeded UPstream::listEq

- was only used in Pstream::combineReduce(...) with a full list,
  which should have been avoided in most cases anyhow.
  Much more efficient to simply gather the sizes directly
This commit is contained in:
Mark Olesen
2023-02-16 14:30:21 +01:00
parent fdd7e4d87f
commit c038a9447c
2 changed files with 2 additions and 18 deletions

View File

@ -86,8 +86,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef ListListOps_H
#define ListListOps_H
#ifndef Foam_ListListOps_H
#define Foam_ListListOps_H
#include "labelList.H"

View File

@ -184,22 +184,6 @@ public:
friend Ostream& operator<<(Ostream&, const commsStruct&);
};
//- combineReduce operator for lists. Used for counting.
struct listEq
{
template<class T>
void operator()(T& x, const T& y) const
{
forAll(y, i)
{
if (y[i].size())
{
x[i] = y[i];
}
}
}
};
private: