From 509a28b18428b68f186abf7fdfe6f1f6d83cdad3 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 7 Oct 2020 14:56:00 -0400
Subject: [PATCH] RootCollection: Fix cppcheck warnings.

 - Pass class instances by const reference, not by value.
---
 .../APR/RootCollection/src/RootCollectionSchemaEditor.cpp   | 6 +++---
 .../APR/RootCollection/src/RootCollectionSchemaEditor.h     | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Database/APR/RootCollection/src/RootCollectionSchemaEditor.cpp b/Database/APR/RootCollection/src/RootCollectionSchemaEditor.cpp
index af9c06557ff..2b41f3e291d 100644
--- a/Database/APR/RootCollection/src/RootCollectionSchemaEditor.cpp
+++ b/Database/APR/RootCollection/src/RootCollectionSchemaEditor.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "CollectionBase/CollectionBaseNames.h"
@@ -222,7 +222,7 @@ dropIndex( const std::vector<std::string>& /* columnNames  */)
 
 void
 pool::RootCollection::RootCollectionSchemaEditor::
-setUniqueConstraint( std::string /* constraintName */, const std::string& /* columnName  */)
+setUniqueConstraint( const std::string& /* constraintName */, const std::string& /* columnName  */)
 {
    methodNotImplemented("setUniqueConstraint ");
 }
@@ -233,7 +233,7 @@ setUniqueConstraint( std::string /* constraintName */, const std::string& /* col
 
 void
 pool::RootCollection::RootCollectionSchemaEditor::
-setUniqueConstraint( std::string /* constraintName */, const std::vector<std::string>& /* columnNames  */)
+setUniqueConstraint( const std::string& /* constraintName */, const std::vector<std::string>& /* columnNames  */)
 {
    methodNotImplemented("setUniqueConstraint ");
 }
diff --git a/Database/APR/RootCollection/src/RootCollectionSchemaEditor.h b/Database/APR/RootCollection/src/RootCollectionSchemaEditor.h
index 61b58281291..edf8eb8eabc 100644
--- a/Database/APR/RootCollection/src/RootCollectionSchemaEditor.h
+++ b/Database/APR/RootCollection/src/RootCollectionSchemaEditor.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef ROOTCOLLECTION_COLLECTIONSCHEMAEDITOR_H
@@ -196,7 +196,7 @@ namespace pool {
          *
          * @param columnName Name of column for which constraint is applied.
          */
-        virtual void setUniqueConstraint( std::string constraintName, const std::string& columnName );
+        virtual void setUniqueConstraint( const std::string& constraintName, const std::string& columnName );
 
         /**
          * Sets a unique constraint on one or more columns of the collection. Automatically generates a
@@ -204,7 +204,7 @@ namespace pool {
          *
          * @param columnNames Names of columns for which constraint is applied.
          */
-        virtual void setUniqueConstraint( std::string constraintName, const std::vector<std::string>& columnNames );
+        virtual void setUniqueConstraint( const std::string& constraintName, const std::vector<std::string>& columnNames );
 
         /**
          * Unsets an existing unique constraint on a single column of the collection, 
-- 
GitLab