Commit 37460570 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Add sensible linter suggestions

parent 331e2339
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -225,7 +225,7 @@ Configuration ConfigReader::getHeaderConfiguration() const {
std::vector<Configuration> ConfigReader::getConfigurations(std::string name) const {
    std::transform(name.begin(), name.end(), name.begin(), ::tolower);
    if(!hasConfiguration(name)) {
        return std::vector<Configuration>();
        return {};
    }

    std::vector<Configuration> result;
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ void OptionParser::parseOption(std::string line) {
        // Other identifier bound option is passed
        auto identifier = key.substr(0, dot_pos);
        key = key.substr(dot_pos + 1);
        identifier_options_[identifier].push_back(std::make_pair(key, value));
        identifier_options_[identifier].emplace_back(key, value);
    }
}

+2 −2
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ DetectorModel::DetectorModel(std::string type,
                             std::shared_ptr<DetectorAssembly> assembly,
                             const ConfigReader& reader,
                             const Configuration& config)
    : type_(std::move(type)), assembly_(std::move(assembly)), reader_(std::move(reader)) {
    : type_(std::move(type)), assembly_(std::move(assembly)), reader_(reader) {
    using namespace ROOT::Math;

    // Sensor thickness
@@ -149,7 +149,7 @@ DetectorModel::DetectorModel(std::string type,
                        std::move(offset),
                        std::move(material),
                        std::move(hole_type),
                        std::move(location),
                        location,
                        hole_size,
                        std::move(hole_offset));

+3 −3
Original line number Diff line number Diff line
@@ -293,7 +293,7 @@ std::pair<ModuleIdentifier, Module*> ModuleManager::create_unique_modules(void*
                                                                          Messenger* messenger,
                                                                          GeometryManager* geo_manager) {
    // Make the vector to return
    std::string module_name = config.getName();
    const std::string& module_name = config.getName();

    // Return error if user tried to specialize the unique module:
    if(config.has("name")) {
@@ -367,7 +367,7 @@ std::vector<std::pair<ModuleIdentifier, Module*>> ModuleManager::create_detector
                                                                                         Configuration& config,
                                                                                         Messenger* messenger,
                                                                                         GeometryManager* geo_manager) {
    std::string module_name = config.getName();
    const std::string& module_name = config.getName();
    LOG(DEBUG) << "Creating instantions for detector module " << module_name;

    // Create the basic identifier
@@ -1011,7 +1011,7 @@ void ModuleManager::finalize() {
        }
        LOG(WARNING) << st.str();
    }
    for(auto& config : conf_manager_->getInstanceConfigurations()) {
    for(const auto& config : conf_manager_->getInstanceConfigurations()) {
        auto unique_name = config.getName();
        auto identifier = config.get<std::string>("identifier");
        if(!identifier.empty()) {
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ std::string allpix::trim(const std::string& str, const std::string& delims) {
    if(b == std::string::npos || e == std::string::npos) {
        return "";
    }
    return std::string(str, b, e - b + 1);
    return {str, b, e - b + 1};
}

std::string allpix::from_string_helper(std::string str) {
Loading