Skip to content

Commit dcf0d1d

Browse files
committed
[hist] Rely on injected-class-name
In a class template scope, the injected-class-name allows to omit the template arguments which makes the code more readable.
1 parent 1873a42 commit dcf0d1d

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

hist/histv7/inc/ROOT/RHist.hxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,21 @@ public:
9191
///
9292
/// Copying all bin contents can be an expensive operation, depending on the number of bins. If required, users can
9393
/// explicitly call Clone().
94-
RHist(const RHist<BinContentType> &) = delete;
94+
RHist(const RHist &) = delete;
9595
/// Efficiently move construct a histogram.
9696
///
9797
/// After this operation, the moved-from object is invalid.
98-
RHist(RHist<BinContentType> &&) = default;
98+
RHist(RHist &&) = default;
9999

100100
/// The copy assignment operator is deleted.
101101
///
102102
/// Copying all bin contents can be an expensive operation, depending on the number of bins. If required, users can
103103
/// explicitly call Clone().
104-
RHist<BinContentType> &operator=(const RHist<BinContentType> &) = delete;
104+
RHist &operator=(const RHist &) = delete;
105105
/// Efficiently move a histogram.
106106
///
107107
/// After this operation, the moved-from object is invalid.
108-
RHist<BinContentType> &operator=(RHist<BinContentType> &&) = default;
108+
RHist &operator=(RHist &&) = default;
109109

110110
~RHist() = default;
111111

@@ -178,7 +178,7 @@ public:
178178
/// Throws an exception if the axes configurations are not identical.
179179
///
180180
/// \param[in] other another histogram
181-
void Add(const RHist<BinContentType> &other)
181+
void Add(const RHist &other)
182182
{
183183
fEngine.Add(other.fEngine);
184184
fStats.Add(other.fStats);
@@ -189,7 +189,7 @@ public:
189189
/// Throws an exception if the axes configurations are not identical.
190190
///
191191
/// \param[in] other another histogram that must not be modified during the operation
192-
void AddAtomic(const RHist<BinContentType> &other)
192+
void AddAtomic(const RHist &other)
193193
{
194194
fEngine.AddAtomic(other.fEngine);
195195
fStats.AddAtomic(other.fStats);
@@ -207,9 +207,9 @@ public:
207207
/// Copying all bin contents can be an expensive operation, depending on the number of bins.
208208
///
209209
/// \return the cloned object
210-
RHist<BinContentType> Clone() const
210+
RHist Clone() const
211211
{
212-
RHist<BinContentType> h(fEngine.Clone());
212+
RHist h(fEngine.Clone());
213213
h.fStats = fStats;
214214
return h;
215215
}

hist/histv7/inc/ROOT/RHistConcurrentFiller.hxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ public:
5454
}
5555
}
5656

57-
RHistConcurrentFiller(const RHistConcurrentFiller<BinContentType> &) = delete;
58-
RHistConcurrentFiller(RHistConcurrentFiller<BinContentType> &&) = delete;
59-
RHistConcurrentFiller<BinContentType> &operator=(const RHistConcurrentFiller<BinContentType> &) = delete;
60-
RHistConcurrentFiller<BinContentType> &operator=(RHistConcurrentFiller<BinContentType> &&) = delete;
57+
RHistConcurrentFiller(const RHistConcurrentFiller &) = delete;
58+
RHistConcurrentFiller(RHistConcurrentFiller &&) = delete;
59+
RHistConcurrentFiller &operator=(const RHistConcurrentFiller &) = delete;
60+
RHistConcurrentFiller &operator=(RHistConcurrentFiller &&) = delete;
6161

6262
~RHistConcurrentFiller()
6363
{

hist/histv7/inc/ROOT/RHistEngine.hxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,21 @@ public:
100100
///
101101
/// Copying all bin contents can be an expensive operation, depending on the number of bins. If required, users can
102102
/// explicitly call Clone().
103-
RHistEngine(const RHistEngine<BinContentType> &) = delete;
103+
RHistEngine(const RHistEngine &) = delete;
104104
/// Efficiently move construct a histogram engine.
105105
///
106106
/// After this operation, the moved-from object is invalid.
107-
RHistEngine(RHistEngine<BinContentType> &&) = default;
107+
RHistEngine(RHistEngine &&) = default;
108108

109109
/// The copy assignment operator is deleted.
110110
///
111111
/// Copying all bin contents can be an expensive operation, depending on the number of bins. If required, users can
112112
/// explicitly call Clone().
113-
RHistEngine<BinContentType> &operator=(const RHistEngine<BinContentType> &) = delete;
113+
RHistEngine &operator=(const RHistEngine &) = delete;
114114
/// Efficiently move a histogram engine.
115115
///
116116
/// After this operation, the moved-from object is invalid.
117-
RHistEngine<BinContentType> &operator=(RHistEngine<BinContentType> &&) = default;
117+
RHistEngine &operator=(RHistEngine &&) = default;
118118

119119
~RHistEngine() = default;
120120

@@ -187,7 +187,7 @@ public:
187187
/// Throws an exception if the axes configurations are not identical.
188188
///
189189
/// \param[in] other another histogram
190-
void Add(const RHistEngine<BinContentType> &other)
190+
void Add(const RHistEngine &other)
191191
{
192192
if (fAxes != other.fAxes) {
193193
throw std::invalid_argument("axes configurations not identical in Add");
@@ -202,7 +202,7 @@ public:
202202
/// Throws an exception if the axes configurations are not identical.
203203
///
204204
/// \param[in] other another histogram that must not be modified during the operation
205-
void AddAtomic(const RHistEngine<BinContentType> &other)
205+
void AddAtomic(const RHistEngine &other)
206206
{
207207
if (fAxes != other.fAxes) {
208208
throw std::invalid_argument("axes configurations not identical in AddAtomic");
@@ -225,9 +225,9 @@ public:
225225
/// Copying all bin contents can be an expensive operation, depending on the number of bins.
226226
///
227227
/// \return the cloned object
228-
RHistEngine<BinContentType> Clone() const
228+
RHistEngine Clone() const
229229
{
230-
RHistEngine<BinContentType> h(fAxes.Get());
230+
RHistEngine h(fAxes.Get());
231231
for (std::size_t i = 0; i < fBinContents.size(); i++) {
232232
h.fBinContents[i] = fBinContents[i];
233233
}

hist/histv7/inc/ROOT/RHistFillContext.hxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ private:
4040

4141
/// \sa RHistConcurrentFiller::CreateFillContent()
4242
explicit RHistFillContext(RHist<BinContentType> &hist) : fHist(&hist), fStats(hist.GetNDimensions()) {}
43-
RHistFillContext(const RHistFillContext<BinContentType> &) = delete;
44-
RHistFillContext(RHistFillContext<BinContentType> &&) = default;
45-
RHistFillContext<BinContentType> &operator=(const RHistFillContext<BinContentType> &) = delete;
46-
RHistFillContext<BinContentType> &operator=(RHistFillContext<BinContentType> &&) = default;
43+
RHistFillContext(const RHistFillContext &) = delete;
44+
RHistFillContext(RHistFillContext &&) = default;
45+
RHistFillContext &operator=(const RHistFillContext &) = delete;
46+
RHistFillContext &operator=(RHistFillContext &&) = default;
4747

4848
public:
4949
~RHistFillContext() { Flush(); }

0 commit comments

Comments
 (0)