From d12a4e6e3f97db3b6ee1120b09f4ff4efaa2a779 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 25 Feb 2019 10:13:27 +0000 Subject: Work around warning of expression with side-effects in typeid --- icetray/icetray/options.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/icetray/icetray/options.cpp b/icetray/icetray/options.cpp index 821824a..a23ebd7 100644 --- a/icetray/icetray/options.cpp +++ b/icetray/icetray/options.cpp @@ -25,7 +25,8 @@ namespace IceTray { auto defManager = AdHoc::PluginManager::getDefault(); for (auto f : defManager->getAll()) { auto o = f->implementation()->create(); - defManager->add(o, typeid(*o).name(), __FILE__, __LINE__); + auto & inst = *o; + defManager->add(o, typeid(inst).name(), __FILE__, __LINE__); all.add(*o->getOptions()); } } -- cgit v1.2.3