diff --git a/hist/hist/src/TH1.cxx b/hist/hist/src/TH1.cxx index 4c19b12404755e5115ca257fa1e7e690e2d0110c..1cdb59de52b2a973c68939da2fb10386ad93499f 100644 --- a/hist/hist/src/TH1.cxx +++ b/hist/hist/src/TH1.cxx @@ -861,12 +861,12 @@ void TH1::Add(const TH1 *h1, Double_t c1) try { CheckConsistency(this,h1); - } catch(DifferentNumberOfBins& e) { + } catch(DifferentNumberOfBins&) { Error("Add","Attempt to add histograms with different number of bins"); return; - } catch(DifferentAxisLimits& e) { + } catch(DifferentAxisLimits&) { Warning("Add","Attempt to add histograms with different axis limits"); - } catch(DifferentBinLimits& e) { + } catch(DifferentBinLimits&) { Warning("Add","Attempt to add histograms with different bin limits"); } @@ -973,12 +973,12 @@ void TH1::Add(const TH1 *h1, const TH1 *h2, Double_t c1, Double_t c2) try { CheckConsistency(h1,h2); CheckConsistency(this,h1); - } catch(DifferentNumberOfBins& e) { + } catch(DifferentNumberOfBins&) { Error("Add","Attempt to add histograms with different number of bins"); return; - } catch(DifferentAxisLimits& e) { + } catch(DifferentAxisLimits&) { Warning("Add","Attempt to add histograms with different axis limits"); - } catch(DifferentBinLimits& e) { + } catch(DifferentBinLimits&) { Warning("Add","Attempt to add histograms with different bin limits"); } @@ -2294,12 +2294,12 @@ void TH1::Divide(const TH1 *h1) try { CheckConsistency(this,h1); - } catch(DifferentNumberOfBins& e) { + } catch(DifferentNumberOfBins&) { Error("Divide","Attempt to divide histograms with different number of bins"); return; - } catch(DifferentAxisLimits& e) { + } catch(DifferentAxisLimits&) { Warning("Divide","Attempt to divide histograms with different axis limits"); - } catch(DifferentBinLimits& e) { + } catch(DifferentBinLimits&) { Warning("Divide","Attempt to divide histograms with different bin limits"); } @@ -2381,12 +2381,12 @@ void TH1::Divide(const TH1 *h1, const TH1 *h2, Double_t c1, Double_t c2, Option_ try { CheckConsistency(h1,h2); CheckConsistency(this,h1); - } catch(DifferentNumberOfBins& e) { + } catch(DifferentNumberOfBins&) { Error("Divide","Attempt to divide histograms with different number of bins"); return; - } catch(DifferentAxisLimits& e) { + } catch(DifferentAxisLimits&) { Warning("Divide","Attempt to divide histograms with different axis limits"); - } catch(DifferentBinLimits& e) { + } catch(DifferentBinLimits&) { Warning("Divide","Attempt to divide histograms with different bin limits"); } @@ -4964,12 +4964,12 @@ void TH1::Multiply(const TH1 *h1) try { CheckConsistency(this,h1); - } catch(DifferentNumberOfBins& e) { + } catch(DifferentNumberOfBins&) { Error("Multiply","Attempt to multiply histograms with different number of bins"); return; - } catch(DifferentAxisLimits& e) { + } catch(DifferentAxisLimits&) { Warning("Multiply","Attempt to multiply histograms with different axis limits"); - } catch(DifferentBinLimits& e) { + } catch(DifferentBinLimits&) { Warning("Multiply","Attempt to multiply histograms with different bin limits"); } @@ -5042,12 +5042,12 @@ void TH1::Multiply(const TH1 *h1, const TH1 *h2, Double_t c1, Double_t c2, Optio try { CheckConsistency(h1,h2); CheckConsistency(this,h1); - } catch(DifferentNumberOfBins& e) { + } catch(DifferentNumberOfBins&) { Error("Multiply","Attempt to multiply histograms with different number of bins"); return; - } catch(DifferentAxisLimits& e) { + } catch(DifferentAxisLimits&) { Warning("Multiply","Attempt to multiply histograms with different axis limits"); - } catch(DifferentBinLimits& e) { + } catch(DifferentBinLimits&) { Warning("Multiply","Attempt to multiply histograms with different bin limits"); } diff --git a/math/mathcore/src/SparseData.cxx b/math/mathcore/src/SparseData.cxx index f3e71d30d4a3f07681acebade3525022a61e0dbc..6be8b1f2034e05ad9e21804cc8ff6d8e845e4f48 100644 --- a/math/mathcore/src/SparseData.cxx +++ b/math/mathcore/src/SparseData.cxx @@ -36,7 +36,8 @@ namespace ROOT { public: // Creates a Box with limits specified by the vectors and // content=value and error=error - Box(vector<double>& min, vector<double>& max, double value = 0.0, double error = 1.0): + Box(const vector<double>& min, const vector<double>& max, + const double value = 0.0, const double error = 1.0): _min(min), _max(max), _val(value), _error(error) { } @@ -179,7 +180,7 @@ namespace ROOT { void push_back(Box& box) { l.push_back(box); } list<Box>::iterator begin() { return l.begin(); } list<Box>::iterator end() { return l.end(); } - void remove(Box& box) { l.remove(box); } + void remove(list<Box>::iterator it) { l.erase(it); } list<Box>& getList() { return l; } private: list<Box> l; @@ -244,7 +245,7 @@ namespace ROOT { it->getMin().size(), it->getMin().size() - 1, l->getList(), content, error ); // and remove it from the list - l->remove(*it); + l->remove(it); } }