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

Use reference instead of copy, thanks Coverity!

parent b9f7298a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ Module::Module(Configuration& config, std::shared_ptr<Detector> detector)
Module::~Module() {
    // Remove delegates
    try {
        for(auto delegate : delegates_) {
        for(auto& delegate : delegates_) {
            delegate.first->remove_delegate(delegate.second);
        }
    } catch(std::out_of_range&) {
+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ namespace allpix {
                gdml_daughter->SetRotation(rotation_matrix);

                // Check if color information is available and set it to the daughter volume
                for(auto aux : parser_.GetVolumeAuxiliaryInformation(gdml_daughter_log)) {
                for(auto& aux : parser_.GetVolumeAuxiliaryInformation(gdml_daughter_log)) {
                    std::transform(aux.type.begin(), aux.type.end(), aux.type.begin(), ::tolower);
                    if(aux.type == "color" || aux.type == "colour") {
                        gdml_daughter_log->SetVisAttributes(G4VisAttributes(get_color(aux.value)));