summaryrefslogtreecommitdiffstats
path: root/staging_vespalib/src/vespa/vespalib/objects/identifiable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'staging_vespalib/src/vespa/vespalib/objects/identifiable.cpp')
-rw-r--r--staging_vespalib/src/vespa/vespalib/objects/identifiable.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/objects/identifiable.cpp b/staging_vespalib/src/vespa/vespalib/objects/identifiable.cpp
index 84bdc0a45d0..6cc2af1fc90 100644
--- a/staging_vespalib/src/vespa/vespalib/objects/identifiable.cpp
+++ b/staging_vespalib/src/vespa/vespalib/objects/identifiable.cpp
@@ -116,12 +116,13 @@ Identifiable::RuntimeClass::RuntimeClass(RuntimeInfo * info_) :
{
if (_rt->_factory) {
Identifiable::UP tmp(create());
+ Identifiable &tmpref = *tmp;
assert(id() == tmp->getClass().id());
//printf("Class %s has typeinfo %s\n", name(), typeid(*tmp).name());
for (const RuntimeInfo * curr = _rt; curr && curr != curr->_base; curr = curr->_base) {
//printf("\tinherits %s : typeinfo = %s\n", curr->_name, curr->_typeId().name());
if ( ! curr->_tryCast(tmp.get()) ) {
- throw std::runtime_error(make_string("(%s, %s) is not a baseclass of (%s, %s)", curr->_name, curr->_typeId().name(), name(), typeid(*tmp).name()));
+ throw std::runtime_error(make_string("(%s, %s) is not a baseclass of (%s, %s)", curr->_name, curr->_typeId().name(), name(), typeid(tmpref).name()));
}
}
}