fix dangling pointer, remove superfluous semicolons, avoid excessive report messages of extension object

This commit is contained in:
wmayer
2016-12-09 23:03:18 +01:00
parent c12f81814f
commit 6782fe8086
4 changed files with 18 additions and 14 deletions

View File

@@ -87,7 +87,7 @@ bool ExtensionContainer::hasExtension(const char* name) const {
//and for types derived from it, as they can be cast to the extension
for(auto entry : _extensions) {
if(strcmp(entry.second->name(), name) == 0)
if(strcmp(entry.second->name().c_str(), name) == 0)
return true;
}
return false;
@@ -114,7 +114,7 @@ Extension* ExtensionContainer::getExtension(const char* name) {
//and for types derived from it, as they can be cast to the extension
for(auto entry : _extensions) {
if(strcmp(entry.second->name(), name) == 0)
if(strcmp(entry.second->name().c_str(), name) == 0)
return entry.second;
}
return nullptr;