App: modernize C++11
* use nullptr
This commit is contained in:
@@ -102,7 +102,7 @@ Extension* ExtensionContainer::getExtension(Base::Type t, bool derived, bool no_
|
||||
if(entry.first.isDerivedFrom(t))
|
||||
return entry.second;
|
||||
}
|
||||
if(no_except) return 0;
|
||||
if(no_except) return nullptr;
|
||||
//if we arrive here we don't have anything matching
|
||||
throw Base::TypeError("ExtensionContainer::getExtension: No extension of given type available");
|
||||
}
|
||||
@@ -110,7 +110,7 @@ Extension* ExtensionContainer::getExtension(Base::Type t, bool derived, bool no_
|
||||
return result->second;
|
||||
}
|
||||
else {
|
||||
if(no_except) return 0;
|
||||
if(no_except) return nullptr;
|
||||
//if we arrive here we don't have anything matching
|
||||
throw Base::TypeError("ExtensionContainer::getExtension: No extension of given type available");
|
||||
}
|
||||
@@ -202,77 +202,77 @@ short int ExtensionContainer::getPropertyType(const char* name) const {
|
||||
const char* ExtensionContainer::getPropertyName(const Property* prop) const {
|
||||
|
||||
const char* res = App::PropertyContainer::getPropertyName(prop);
|
||||
if(res != 0)
|
||||
if(res != nullptr)
|
||||
return res;
|
||||
|
||||
for(auto entry : _extensions) {
|
||||
res = entry.second->extensionGetPropertyName(prop);
|
||||
if(res != 0)
|
||||
if(res != nullptr)
|
||||
return res;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const char* ExtensionContainer::getPropertyGroup(const Property* prop) const {
|
||||
|
||||
const char* res = App::PropertyContainer::getPropertyGroup(prop);
|
||||
if(res != 0)
|
||||
if(res != nullptr)
|
||||
return res;
|
||||
|
||||
for(auto entry : _extensions) {
|
||||
res = entry.second->extensionGetPropertyGroup(prop);
|
||||
if(res != 0)
|
||||
if(res != nullptr)
|
||||
return res;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const char* ExtensionContainer::getPropertyGroup(const char* name) const {
|
||||
|
||||
const char* res = App::PropertyContainer::getPropertyGroup(name);
|
||||
if(res != 0)
|
||||
if(res != nullptr)
|
||||
return res;
|
||||
|
||||
for(auto entry : _extensions) {
|
||||
res = entry.second->extensionGetPropertyGroup(name);
|
||||
if(res != 0)
|
||||
if(res != nullptr)
|
||||
return res;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
const char* ExtensionContainer::getPropertyDocumentation(const Property* prop) const {
|
||||
|
||||
const char* res = App::PropertyContainer::getPropertyDocumentation(prop);
|
||||
if(res != 0)
|
||||
if(res != nullptr)
|
||||
return res;
|
||||
|
||||
for(auto entry : _extensions) {
|
||||
res = entry.second->extensionGetPropertyDocumentation(prop);
|
||||
if(res != 0)
|
||||
if(res != nullptr)
|
||||
return res;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const char* ExtensionContainer::getPropertyDocumentation(const char* name) const {
|
||||
|
||||
const char* res = App::PropertyContainer::getPropertyDocumentation(name);
|
||||
if(res != 0)
|
||||
if(res != nullptr)
|
||||
return res;
|
||||
|
||||
for(auto entry : _extensions) {
|
||||
res = entry.second->extensionGetPropertyDocumentation(name);
|
||||
if(res != 0)
|
||||
if(res != nullptr)
|
||||
return res;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ExtensionContainer::onChanged(const Property* prop) {
|
||||
|
||||
Reference in New Issue
Block a user