Skip to content
Snippets Groups Projects
Commit 14e996fe authored by Robert Maynard's avatar Robert Maynard
Browse files

Correct C++14 patterns in vtkGenerateGlobalIds

In C++11 the return type of a lambda can be only inferred if the
lambda is a single statement with an explicit `return`. So for
functions that have no return, we have to explicit state that
they don't have a return.
parent a89637aa
Branches
No related tags found
No related merge requests found
......@@ -156,7 +156,7 @@ static bool GenerateIds(vtkDataObject* dobj, vtkGenerateGlobalIds* self, bool ce
diy::Master master(
comm, 1, -1, []() { return static_cast<void*>(new ElementBlockT); },
[](void* b) { delete static_cast<ElementBlockT*>(b); });
[](void* b) -> void { delete static_cast<ElementBlockT*>(b); });
vtkLogStartScope(TRACE, "populate master");
std::vector<int> gids;
......@@ -185,8 +185,8 @@ static bool GenerateIds(vtkDataObject* dobj, vtkGenerateGlobalIds* self, bool ce
vtkLogStartScope(TRACE, "merge-points");
// iterate over all local blocks to give them unique ids.
master.foreach ([](ElementBlockT* b, // local block
const diy::Master::ProxyWithLink&) // communication proxy
master.foreach ([](ElementBlockT* b, // local block
const diy::Master::ProxyWithLink&) -> void // communication proxy
{ b->MergeElements(); });
vtkLogEndScope("merge-points");
self->UpdateProgress(0.75);
......@@ -454,8 +454,8 @@ public:
vtkIdType UniqueElementsCount{ 0 };
std::map<int, std::vector<MessageItemTT> > OutMessage;
vtkSmartPointer<vtkIdTypeArray> GlobalIds = nullptr;
vtkSmartPointer<vtkUnsignedCharArray> GhostArray = nullptr;
vtkSmartPointer<vtkIdTypeArray> GlobalIds;
vtkSmartPointer<vtkUnsignedCharArray> GhostArray;
void Initialize(int self_gid, vtkPoints* points, vtkDataSet* dataset)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment