From a72ab03be5b1faf54bb16443c3b5be675d35676b Mon Sep 17 00:00:00 2001 From: wmtan Date: Sat, 20 Jul 2013 01:56:40 +0200 Subject: [PATCH] Remove some const_cast's --- FWCore/Framework/interface/InputSource.h | 4 ++-- FWCore/Framework/src/InputSource.cc | 2 +- IOPool/Common/bin/EdmProvDump.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FWCore/Framework/interface/InputSource.h b/FWCore/Framework/interface/InputSource.h index a03a52633665d..f04d153be9d64 100644 --- a/FWCore/Framework/interface/InputSource.h +++ b/FWCore/Framework/interface/InputSource.h @@ -313,7 +313,7 @@ namespace edm { /// To set the current time, as seen by the input source void setTimestamp(Timestamp const& theTime) {time_ = theTime;} - ProductRegistry& productRegistryUpdate() const {return const_cast(*productRegistry_);} + ProductRegistry& productRegistryUpdate() const {return *productRegistry_;} ItemType state() const{return state_;} void setRunAuxiliary(RunAuxiliary* rp) { runAuxiliary_.reset(rp); @@ -395,7 +395,7 @@ namespace edm { int readCount_; ProcessingMode processingMode_; ModuleDescription const moduleDescription_; - boost::shared_ptr productRegistry_; + boost::shared_ptr productRegistry_; boost::shared_ptr branchIDListHelper_; bool const primary_; std::string processGUID_; diff --git a/FWCore/Framework/src/InputSource.cc b/FWCore/Framework/src/InputSource.cc index c67eb1896c559..298e9b3912003 100644 --- a/FWCore/Framework/src/InputSource.cc +++ b/FWCore/Framework/src/InputSource.cc @@ -62,7 +62,7 @@ namespace edm { readCount_(0), processingMode_(RunsLumisAndEvents), moduleDescription_(desc.moduleDescription_), - productRegistry_(createSharedPtrToStatic(desc.productRegistry_)), + productRegistry_(createSharedPtrToStatic(desc.productRegistry_)), branchIDListHelper_(desc.branchIDListHelper_), primary_(pset.getParameter("@module_label") == std::string("@main_input")), processGUID_(primary_ ? createGlobalIdentifier() : std::string()), diff --git a/IOPool/Common/bin/EdmProvDump.cc b/IOPool/Common/bin/EdmProvDump.cc index 8124693aece47..5fa5d629be92d 100644 --- a/IOPool/Common/bin/EdmProvDump.cc +++ b/IOPool/Common/bin/EdmProvDump.cc @@ -879,7 +879,7 @@ ProvenanceDumper::work_() { it != itEnd; ++it) { //force it to rebuild the branch name - const_cast(it->second).init(); + it->second.init(); if(showDependencies_ || extendedAncestors_ || extendedDescendants_) { branchIDToBranchName[it->second.branchID()] = it->second.branchName();