mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Hadrons: lattice dynamic cast fix
This commit is contained in:
parent
9e986654e6
commit
7dfdc9baa0
@ -149,11 +149,11 @@ T * Environment::get(const std::string name) const
|
||||
{
|
||||
if (hasLattice(name))
|
||||
{
|
||||
try
|
||||
if (auto pt = dynamic_cast<T *>(lattice_.at(name).get()))
|
||||
{
|
||||
return dynamic_cast<T *>(lattice_.at(name).get());
|
||||
return pt;
|
||||
}
|
||||
catch (std::bad_cast &)
|
||||
else
|
||||
{
|
||||
HADRON_ERROR("object '" + name + "' does not have type "
|
||||
+ typeid(T *).name() + "(object type: "
|
||||
|
Loading…
Reference in New Issue
Block a user