Skip to content
Snippets Groups Projects
Commit 509a28b1 authored by scott snyder's avatar scott snyder Committed by scott snyder
Browse files

RootCollection: Fix cppcheck warnings.

 - Pass class instances by const reference, not by value.
parent c91bc005
No related branches found
No related tags found
No related merge requests found
/*
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 ");
}
......
/*
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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment