From 2251b4b12fe7945255ca339b314885d5a196ab9d Mon Sep 17 00:00:00 2001 From: David Date: Thu, 3 Jun 2021 12:12:05 +0200 Subject: [PATCH 1/2] remove newly committed odr violation; fix warning from boost --- CondCore/CondDB/interface/CredentialStore.h | 6 +++--- CondCore/CondDB/plugins/RelationalAuthenticationService.cc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CondCore/CondDB/interface/CredentialStore.h b/CondCore/CondDB/interface/CredentialStore.h index fc412b212001e..b34ebd847a87a 100644 --- a/CondCore/CondDB/interface/CredentialStore.h +++ b/CondCore/CondDB/interface/CredentialStore.h @@ -7,6 +7,7 @@ #include #include #include +#include // #include "CoralBase/MessageStream.h" @@ -19,10 +20,9 @@ namespace coral { } // namespace coral -std::string to_lower(const std::string& s) { +inline std::string to_lower(const std::string& s) { std::string str(s); - for (auto& c : str) - c = tolower(c); + std::transform(str.begin(), str.end(), str.begin(), [](unsigned char c){ return std::tolower(c); }); return str; } diff --git a/CondCore/CondDB/plugins/RelationalAuthenticationService.cc b/CondCore/CondDB/plugins/RelationalAuthenticationService.cc index df072b5bedd4a..08358f5280b26 100644 --- a/CondCore/CondDB/plugins/RelationalAuthenticationService.cc +++ b/CondCore/CondDB/plugins/RelationalAuthenticationService.cc @@ -16,7 +16,7 @@ #include #include -#include +#include #include "CoralBase/MessageStream.h" @@ -24,7 +24,7 @@ cond::RelationalAuthenticationService::RelationalAuthenticationService::Relation const std::string& key) : coral::Service(key), m_authenticationPath(""), m_db(), m_cache(), m_callbackID(0) { boost::function1 cb(boost::bind( - &cond::RelationalAuthenticationService::RelationalAuthenticationService::setAuthenticationPath, this, _1)); + &cond::RelationalAuthenticationService::RelationalAuthenticationService::setAuthenticationPath, this, boost::placeholders::_1)); coral::Property* pm = dynamic_cast( coral::Context::instance().PropertyManager().property(auth::COND_AUTH_PATH_PROPERTY)); From b265c83b08ce9fb285c6a71f7b96e025d80b0318 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 3 Jun 2021 12:30:45 +0200 Subject: [PATCH 2/2] code checks --- CondCore/CondDB/interface/CredentialStore.h | 2 +- CondCore/CondDB/plugins/RelationalAuthenticationService.cc | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CondCore/CondDB/interface/CredentialStore.h b/CondCore/CondDB/interface/CredentialStore.h index b34ebd847a87a..669d5dcc3498f 100644 --- a/CondCore/CondDB/interface/CredentialStore.h +++ b/CondCore/CondDB/interface/CredentialStore.h @@ -22,7 +22,7 @@ namespace coral { inline std::string to_lower(const std::string& s) { std::string str(s); - std::transform(str.begin(), str.end(), str.begin(), [](unsigned char c){ return std::tolower(c); }); + std::transform(str.begin(), str.end(), str.begin(), [](unsigned char c) { return std::tolower(c); }); return str; } diff --git a/CondCore/CondDB/plugins/RelationalAuthenticationService.cc b/CondCore/CondDB/plugins/RelationalAuthenticationService.cc index 08358f5280b26..e892326549dfb 100644 --- a/CondCore/CondDB/plugins/RelationalAuthenticationService.cc +++ b/CondCore/CondDB/plugins/RelationalAuthenticationService.cc @@ -23,8 +23,10 @@ cond::RelationalAuthenticationService::RelationalAuthenticationService::RelationalAuthenticationService( const std::string& key) : coral::Service(key), m_authenticationPath(""), m_db(), m_cache(), m_callbackID(0) { - boost::function1 cb(boost::bind( - &cond::RelationalAuthenticationService::RelationalAuthenticationService::setAuthenticationPath, this, boost::placeholders::_1)); + boost::function1 cb( + boost::bind(&cond::RelationalAuthenticationService::RelationalAuthenticationService::setAuthenticationPath, + this, + boost::placeholders::_1)); coral::Property* pm = dynamic_cast( coral::Context::instance().PropertyManager().property(auth::COND_AUTH_PATH_PROPERTY));