Skip to content

Commit

Permalink
Use anonymous namespace in CandIsolatorFromDeposits
Browse files Browse the repository at this point in the history
This appears to avoid an ASAN error when used with LTO.
  • Loading branch information
Dr15Jones committed Mar 7, 2023
1 parent 24d09a4 commit 1b2a30d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions PhysicsTools/IsolationAlgos/plugins/CandIsolatorFromDeposits.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ using namespace edm;
using namespace reco;
using namespace reco::isodeposit;

bool isNumber(const std::string &str) {
static const std::regex re("^[+-]?(\\d+\\.?|\\d*\\.\\d*)$");
return regex_match(str.c_str(), re);
}
double toNumber(const std::string &str) { return atof(str.c_str()); }
namespace {
bool isNumber(const std::string &str) {
static const std::regex re("^[+-]?(\\d+\\.?|\\d*\\.\\d*)$");
return regex_match(str.c_str(), re);
}
double toNumber(const std::string &str) { return atof(str.c_str()); }
} // namespace

CandIsolatorFromDeposits::SingleDeposit::SingleDeposit(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
: srcToken_(iC.consumes<reco::IsoDepositMap>(iConfig.getParameter<edm::InputTag>("src"))),
Expand Down

0 comments on commit 1b2a30d

Please sign in to comment.