Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some const_cast's #152

Merged
merged 1 commit into from
Jul 21, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions FWCore/Framework/interface/InputSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_);}
ProductRegistry& productRegistryUpdate() const {return *productRegistry_;}
ItemType state() const{return state_;}
void setRunAuxiliary(RunAuxiliary* rp) {
runAuxiliary_.reset(rp);
Expand Down Expand Up @@ -395,7 +395,7 @@ namespace edm {
int readCount_;
ProcessingMode processingMode_;
ModuleDescription const moduleDescription_;
boost::shared_ptr<ProductRegistry const> productRegistry_;
boost::shared_ptr<ProductRegistry> productRegistry_;
boost::shared_ptr<BranchIDListHelper> branchIDListHelper_;
bool const primary_;
std::string processGUID_;
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Framework/src/InputSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace edm {
readCount_(0),
processingMode_(RunsLumisAndEvents),
moduleDescription_(desc.moduleDescription_),
productRegistry_(createSharedPtrToStatic<ProductRegistry const>(desc.productRegistry_)),
productRegistry_(createSharedPtrToStatic<ProductRegistry>(desc.productRegistry_)),
branchIDListHelper_(desc.branchIDListHelper_),
primary_(pset.getParameter<std::string>("@module_label") == std::string("@main_input")),
processGUID_(primary_ ? createGlobalIdentifier() : std::string()),
Expand Down
2 changes: 1 addition & 1 deletion IOPool/Common/bin/EdmProvDump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ ProvenanceDumper::work_() {
it != itEnd;
++it) {
//force it to rebuild the branch name
const_cast<edm::BranchDescription&>(it->second).init();
it->second.init();

if(showDependencies_ || extendedAncestors_ || extendedDescendants_) {
branchIDToBranchName[it->second.branchID()] = it->second.branchName();
Expand Down