mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-12 20:27:06 +01:00
Hadrons: no errors when trying to recreate a cache
This commit is contained in:
@ -228,7 +228,11 @@ void Environment::createDerivedObject(const std::string name,
|
|||||||
MemoryProfiler::stats = nullptr;
|
MemoryProfiler::stats = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
// object already exists, no error if it is a cache, error otherwise
|
||||||
|
else if ((object_[address].storage != Storage::cache) or
|
||||||
|
(object_[address].storage != storage) or
|
||||||
|
(object_[address].name != name) or
|
||||||
|
(object_[address].type != &typeid(T)))
|
||||||
{
|
{
|
||||||
HADRON_ERROR(Definition, "object '" + name + "' already allocated");
|
HADRON_ERROR(Definition, "object '" + name + "' already allocated");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user