From 197ad0deda4d9915e411cb12213fecc3274c1c3c Mon Sep 17 00:00:00 2001 From: Frank Gaede <frank.gaede@desy.de> Date: Thu, 8 Aug 2019 14:38:43 +0200 Subject: [PATCH] make compatible w/ macos (c++!4) - replace std::make_any w/ make_any (defined in Any.h) - use std::lock_guard<std::mutex> --- DDDigi/include/DDDigi/DigiData.h | 2 +- DDDigi/src/DigiData.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DDDigi/include/DDDigi/DigiData.h b/DDDigi/include/DDDigi/DigiData.h index 1e4c73318..524162d51 100644 --- a/DDDigi/include/DDDigi/DigiData.h +++ b/DDDigi/include/DDDigi/DigiData.h @@ -170,7 +170,7 @@ namespace dd4hep { virtual ~DigiEvent(); /// Add item by key to the data template<typename T> bool put(const Key& key, T&& object) { - bool ret = data.emplace(key.toLong(),std::make_any<T>(object)).second; + bool ret = data.emplace(key.toLong(),make_any<T>(object)).second; if ( ret ) return ret; except("DigiEvent","Invalid requested to store data in event container. Key:%ld",key.toLong()); throw std::runtime_error("DigiEvent"); // Will never get here! diff --git a/DDDigi/src/DigiData.cpp b/DDDigi/src/DigiData.cpp index c66cf1f50..dc70a2aef 100644 --- a/DDDigi/src/DigiData.cpp +++ b/DDDigi/src/DigiData.cpp @@ -52,7 +52,7 @@ Key& Key::operator=(const Key& copy) { void Key::set(const std::string& name, int mask) { static std::mutex mtx; - std::lock_guard lock(mtx); + std::lock_guard<std::mutex> lock(mtx); if ( name.empty() ) { except("DDDigi::Key", "+++ No key name was specified -- this is illegal!"); } -- GitLab