File tree Expand file tree Collapse file tree 2 files changed +1
-3
lines changed
Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,6 @@ bool HasClassRegistry<TBase>::registerThisType() const
3535 RegistryStorage& reg = getRegistry ();
3636 if (reg.count (this ->type ()))
3737 {
38- // do nothing when registering the same class twice
39- const TBase& regprot = *(reg[this ->type ()]);
40- if (typeid (*this ) == typeid (regprot)) return true ;
4138 // raise exception if trying to register a different class
4239 ostringstream emsg;
4340 emsg << " Prototype type '" << this ->type () <<
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ class TestHasClassRegistry : public CxxTest::TestSuite
4646 void tearDown ()
4747 {
4848 // restore SFTXray registration if removed in some test.
49+ msftb->deregisterType (msftb->type ());
4950 msftb->registerThisType ();
5051 TS_ASSERT (ScatteringFactorTable::isRegisteredType (" X" ));
5152 TS_ASSERT (ScatteringFactorTable::isRegisteredType (" xray" ));
You can’t perform that action at this time.
0 commit comments