mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Hadrons: no errors when trying to recreate a cache
This commit is contained in:
parent
e2fe97277b
commit
65d4f17976
@ -228,7 +228,11 @@ void Environment::createDerivedObject(const std::string name,
|
||||
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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user