Skip to content

Commit

Permalink
small fixed for new warnings in e19
Browse files Browse the repository at this point in the history
  • Loading branch information
rlcee committed Nov 11, 2019
1 parent ef2d4fd commit 82ada23
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ExtinctionMonitorFNAL/Digitization/inc/ProtonPulseShape.hh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace mu2e {
};

struct ProtonPathSort {
bool operator()(const ProtonPathMARSId& a, const ProtonPathMARSId& b) {
bool operator()(const ProtonPathMARSId& a, const ProtonPathMARSId& b) const {
CmpProtonIdAndSimPath cm;
IO::CmpG4JobInfo cg;
return cm(a.minfo,b.minfo) || (!cm(b.minfo, a.minfo) &&
Expand Down
4 changes: 2 additions & 2 deletions GeneralUtilities/inc/csv.hh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ namespace io {
with_file_name() { std::memset(file_name, 0, max_file_name_length + 1); }

void set_file_name(const char* file_name) {
std::strncpy(this->file_name, file_name, max_file_name_length);
std::strncpy(this->file_name, file_name, max_file_name_length+1);
this->file_name[max_file_name_length] = '\0';
}

Expand Down Expand Up @@ -1050,7 +1050,7 @@ namespace io {
private:
LineReader in;

char*(row[column_count]);
char* row[column_count];
std::string column_names[column_count];

std::vector<int> col_order;
Expand Down
2 changes: 1 addition & 1 deletion Mu2eG4/src/PrimaryGeneratorAction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace mu2e {
}

PrimaryGeneratorAction::PrimaryGeneratorAction()
: PrimaryGeneratorAction(true, 0, nullptr, perEvtObjManager)
: PrimaryGeneratorAction(true, 0, nullptr, nullptr)
{}

PrimaryGeneratorAction::PrimaryGeneratorAction(const fhicl::ParameterSet& pset,
Expand Down
12 changes: 6 additions & 6 deletions Mu2eUtilities/src/BuildLinearFitMatrixSums.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ TMatrixD BuildLinearFitMatrixSums::GetCovX(){
double* det = NULL;
try {
GammaINV.Invert(det);
} catch (std::exception exc) {
} catch (std::exception& exc) {

std::stringstream message;
message << "Error in Cov Mat : Cannot fit due to singular matrix error on inversion!" << std::endl;
Expand Down Expand Up @@ -133,7 +133,7 @@ TMatrixD BuildLinearFitMatrixSums::GetAlphaX(){
try {
Gamma.Invert(det);

} catch (std::exception exc) {
} catch (std::exception& exc) {

std::stringstream message;
message << "Error in Alpha : Cannot fit due to singular matrix error on inversion!" << std::endl;
Expand All @@ -156,7 +156,7 @@ TMatrixD BuildLinearFitMatrixSums::GetCovY(){
double* det = NULL;
try {
GammaINV.Invert(det);
} catch (std::exception exc) {
} catch (std::exception& exc) {

std::stringstream message;
message << "Error in Cov Mat : Cannot fit due to singular matrix error on inversion!" << std::endl;
Expand Down Expand Up @@ -184,7 +184,7 @@ TMatrixD BuildLinearFitMatrixSums::GetAlphaY(){
try {
Gamma.Invert(det);

} catch (std::exception exc) {
} catch (std::exception& exc) {

std::stringstream message;
message << "Error in Alpha : Cannot fit due to singular matrix error on inversion!" << std::endl;
Expand All @@ -200,7 +200,7 @@ double BuildLinearFitMatrixSums::GetChi2X(){
double* det = NULL;
try {
GammaX.Invert(det);
} catch (std::exception exc) {
} catch (std::exception& exc) {
std::stringstream message;
message << "Error in Chi2X : Cannot fit due to singular matrix error on inversion!" << std::endl;
}
Expand All @@ -223,7 +223,7 @@ double BuildLinearFitMatrixSums::GetChi2Y(){
try {
GammaY.Invert(det);

} catch (std::exception exc) {
} catch (std::exception& exc) {

std::stringstream message;
message << "Error in Chi2Y : Cannot fit due to singular matrix error on inversion!" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion TrkReco/src/KalFit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ namespace mu2e
struct StrawFlightComp : public binary_function<StrawFlight, StrawFlight, bool> {
double _maxdiff; // maximum flight difference; below this, consider 2 intersections 'the same'
StrawFlightComp(double maxdiff) : _maxdiff(maxdiff) {}
bool operator () (StrawFlight const& a, StrawFlight const& b) { return a._id < b._id ||
bool operator () (StrawFlight const& a, StrawFlight const& b) const { return a._id < b._id ||
( a._id == b._id && a._flt < b._flt && fabs(a._flt-b._flt)>=_maxdiff);}
};

Expand Down

0 comments on commit 82ada23

Please sign in to comment.