diff --git a/src/App/Extension.cpp b/src/App/Extension.cpp index 4a348b53c..35637df6d 100644 --- a/src/App/Extension.cpp +++ b/src/App/Extension.cpp @@ -113,7 +113,7 @@ std::string Extension::name() const { std::string temp(m_extensionType.getName()); std::string::size_type pos = temp.find_last_of(":"); - if(pos != std::string::npos) + if(pos != std::string::npos) return temp.substr(pos+1); else return std::string(); diff --git a/src/App/Extension.h b/src/App/Extension.h index fe68c5862..1dfc8dab8 100644 --- a/src/App/Extension.h +++ b/src/App/Extension.h @@ -255,8 +255,8 @@ public: /** @name Persistance */ //@{ - virtual void extensionSave(Base::Writer&) const {}; - virtual void extensionRestore(Base::XMLReader&) {}; + virtual void extensionSave(Base::Writer&) const {} + virtual void extensionRestore(Base::XMLReader&) {} //@} /** @name TypeHandling */ diff --git a/src/App/ExtensionContainer.cpp b/src/App/ExtensionContainer.cpp index 47f100555..1b5ef4f49 100644 --- a/src/App/ExtensionContainer.cpp +++ b/src/App/ExtensionContainer.cpp @@ -83,7 +83,7 @@ bool ExtensionContainer::hasExtension(Base::Type t) const { return true; } -bool ExtensionContainer::hasExtension(std::string name) const { +bool ExtensionContainer::hasExtension(const std::string& name) const { //and for types derived from it, as they can be cast to the extension for(auto entry : _extensions) { @@ -115,7 +115,7 @@ bool ExtensionContainer::hasExtensions() const { return !_extensions.empty(); } -Extension* ExtensionContainer::getExtension(std::string name) { +Extension* ExtensionContainer::getExtension(const std::string& name) { //and for types derived from it, as they can be cast to the extension for(auto entry : _extensions) { diff --git a/src/App/ExtensionContainer.h b/src/App/ExtensionContainer.h index 303f0e27c..2c81784ae 100644 --- a/src/App/ExtensionContainer.h +++ b/src/App/ExtensionContainer.h @@ -125,10 +125,10 @@ public: void registerExtension(Base::Type extension, App::Extension* ext); bool hasExtension(Base::Type) const; //returns first of type (or derived from) and throws otherwise - bool hasExtension(std::string name) const; //this version does not check derived classes + bool hasExtension(const std::string& name) const; //this version does not check derived classes bool hasExtensions() const; App::Extension* getExtension(Base::Type); //returns first of type (or derived from) and throws otherwise - App::Extension* getExtension(std::string name); //this version does not check derived classes + App::Extension* getExtension(const std::string& name); //this version does not check derived classes //returns first of type (or derived from) and throws otherwise template