Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9e40035

Browse files
committedAug 9, 2024·
Fix a few compiler warnings
1 parent 7e38f93 commit 9e40035

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed
 

‎detector/calorimeter/ECalEndcap_Turbine_o1_v01_geo.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ namespace det {
112112
float LArgapi = nobleLiquidElem.attr<float>(_Unicode(gap));
113113

114114
bool sameNUnitCells = genericBladeElem.attr<bool>(_Unicode(sameNUnitCells));
115-
char* nUnitCellsStrArr = (char*)genericBladeElem.attr<std::string>(_Unicode(nUnitCells)).c_str();
116-
char* nUnitCellsCStr = strtok(nUnitCellsStrArr, " ");
117-
int nUnitCells;
115+
auto nUnitCellsStrArr = genericBladeElem.attr<std::string>(_Unicode(nUnitCells));
116+
char* nUnitCellsCStr = strtok(const_cast<char*>(nUnitCellsStrArr.c_str()), " ");
117+
int nUnitCells = 0;
118118
if (!sameNUnitCells) {
119119
for (unsigned i = 0; i < iWheel; i++) {
120120
nUnitCellsCStr = strtok(NULL, " ");
@@ -162,7 +162,6 @@ namespace det {
162162
float LArgapo = delrPhiGapOnly*TMath::Sin(BladeAngle);
163163
// LArgapo *= 2.;
164164

165-
dd4hep::Solid absBlade;
166165
float riLayer = ri;
167166

168167
std::vector<dd4hep::Volume> claddingLayerVols;
@@ -578,7 +577,6 @@ namespace det {
578577
double ri = rmin;
579578

580579
float supportTubeThickness=supportTubeElem.thickness();
581-
unsigned iSupportTube = 0;
582580

583581
for (unsigned iWheel = 0; iWheel < nWheels; iWheel++) {
584582

@@ -600,7 +598,6 @@ namespace det {
600598
ri = ro;
601599
ro *= radiusRatio;
602600
if (ro > rmax) ro = rmax;
603-
iSupportTube++;
604601
}
605602

606603

‎detectorSegmentations/include/detectorSegmentations/GridDRcalo_k4geo.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ class GridDRcalo_k4geo : public Segmentation {
1818
virtual ~GridDRcalo_k4geo() override;
1919

2020
// Determine the global(local) position based on the cell ID.
21-
virtual Vector3D position(const CellID& aCellID) const;
21+
virtual Vector3D position(const CellID& aCellID) const override;
2222
Vector3D localPosition(const CellID& aCellID) const;
2323
Vector3D localPosition(int numx, int numy, int x_, int y_) const;
2424

2525
virtual CellID cellID(const Vector3D& aLocalPosition, const Vector3D& aGlobalPosition,
26-
const VolumeID& aVolumeID) const;
26+
const VolumeID& aVolumeID) const override;
2727

2828
VolumeID setVolumeID(int numEta, int numPhi) const;
2929
CellID setCellID(int numEta, int numPhi, int x, int y) const;

‎plugins/DRCaloFastSimModel.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ struct FastFiberData
55
{
66
public:
77
FastFiberData(G4int, G4double, G4double, G4double, G4ThreeVector, G4ThreeVector, G4ThreeVector, G4int status = G4OpBoundaryProcessStatus::Undefined);
8-
~FastFiberData() {}
8+
FastFiberData& operator=(const FastFiberData& theData) = default;
9+
10+
FastFiberData(const FastFiberData& theData) = default;
11+
~FastFiberData() = default;
12+
913

1014
void reset();
1115

0 commit comments

Comments
 (0)
Please sign in to comment.