Skip to content

Commit

Permalink
Merge pull request cms-sw#4997 from ianna/dd-return-const-member-from…
Browse files Browse the repository at this point in the history
…-const-function

Return const member from const function
  • Loading branch information
ktf committed Aug 19, 2014
2 parents 9b96258 + 74a240d commit 6b1eb59
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DetectorDescription/Core/interface/DDCompactView.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class DDCompactView
const DDLogicalPart & root() const;

//! The absolute position of the world
DDPosData * worldPosition() const;
const DDPosData * worldPosition() const;

//! Prototype version of calculating the weight of a detector component
double weight(const DDLogicalPart & p) const;
Expand Down
4 changes: 2 additions & 2 deletions DetectorDescription/Core/interface/DDExpandedNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DDExpandedNode

public:
DDExpandedNode(const DDLogicalPart & lp,
DDPosData * pd,
const DDPosData * pd,
const DDTranslation & t,
const DDRotationMatrix & r,
int siblingno);
Expand Down Expand Up @@ -49,7 +49,7 @@ class DDExpandedNode

private:
DDLogicalPart logp_; // logicalpart to provide access to solid & material information
DDPosData * posd_;
const DDPosData * posd_;
DDTranslation trans_; // absolute translation
DDRotationMatrix rot_; // absolute rotation
int siblingno_; // internal sibling-numbering from 0 to max-sibling
Expand Down
2 changes: 1 addition & 1 deletion DetectorDescription/Core/interface/DDExpandedView.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class DDExpandedView
DDGeoHistory history_; //!< std::vector of DDExpandedNode
DDGeoHistory scope_; //!< scope of the expanded view
unsigned int depth_; //!< depth of the scope, 0==unrestricted depth
DDPosData * worldpos_ ; //!< ???
const DDPosData * worldpos_ ; //!< ???
std::vector<nav_type> nextBStack_;
};

Expand Down
2 changes: 1 addition & 1 deletion DetectorDescription/Core/src/DDCompactView.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const DDLogicalPart & DDCompactView::root() const
return rep_->root();
}

DDPosData* DDCompactView::worldPosition() const
const DDPosData* DDCompactView::worldPosition() const
{
return worldpos_.get();
}
Expand Down
2 changes: 1 addition & 1 deletion DetectorDescription/Core/src/DDExpandedNode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "DetectorDescription/Core/interface/DDPosData.h"

DDExpandedNode::DDExpandedNode(const DDLogicalPart & lp,
DDPosData * pd,
const DDPosData * pd,
const DDTranslation & t,
const DDRotationMatrix & r,
int siblingno)
Expand Down
2 changes: 1 addition & 1 deletion DetectorDescription/Core/src/DDExpandedView.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DDExpandedView::DDExpandedView( const DDCompactView & cpv )
{
walker_ = &w2_;

DDPosData * pd((*walker_).current().second);
const DDPosData * pd((*walker_).current().second);
if (!pd)
pd = worldpos_;
DDExpandedNode expn((*walker_).current().first,
Expand Down

0 comments on commit 6b1eb59

Please sign in to comment.