1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-17 15:27:06 +01:00

Hadrons: module creation fix

This commit is contained in:
2016-12-05 11:44:16 +09:00
parent ee5b1fe043
commit 7433eed274
2 changed files with 24 additions and 2 deletions

View File

@ -251,9 +251,9 @@ template <typename M>
void Environment::createModule(const std::string name,
const typename M::Par &par)
{
std::unique_ptr<M> pt(new M(name));
ModPt pt(new M(name));
pt->setPar(par);
static_cast<M *>(pt.get())->setPar(par);
pushModule(pt);
}