Skip to content

Commit 7b98640

Browse files
pre-commit-ci[bot]henryiii
authored andcommitted
style: pre-commit fixes
1 parent 161c8db commit 7b98640

File tree

1 file changed

+27
-28
lines changed

1 file changed

+27
-28
lines changed

include/bh_python/multi_weight.hpp

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace boost {
1313
namespace histogram {
1414

15-
1615
template <class T, class BASE>
1716
struct multi_weight_base : public BASE {
1817
using BASE::BASE;
@@ -29,31 +28,30 @@ struct multi_weight_base : public BASE {
2928
bool operator!=(const S values) const {
3029
return !operator==(values);
3130
}
32-
33-
3431
};
3532

3633
template <class T>
3734
struct multi_weight_reference : public multi_weight_base<T, boost::span<T>> {
38-
//using boost::span<T>::span;
35+
// using boost::span<T>::span;
3936
using multi_weight_base<T, boost::span<T>>::multi_weight_base;
4037

4138
void operator()(const boost::span<T> values) { operator+=(values); }
4239

43-
//template <class S>
44-
//bool operator==(const S values) const {
45-
// if(values.size() != this->size())
46-
// return false;
47-
//
40+
// template <class S>
41+
// bool operator==(const S values) const {
42+
// if(values.size() != this->size())
43+
// return false;
44+
//
4845
// return std::equal(this->begin(), this->end(), values.begin());
4946
//}
50-
//
51-
//template <class S>
52-
//bool operator!=(const S values) const {
47+
//
48+
// template <class S>
49+
// bool operator!=(const S values) const {
5350
// return !operator==(values);
5451
//}
5552

56-
//void operator+=(const std::vector<T> values) { operator+=(boost::span<T>(values)); }
53+
// void operator+=(const std::vector<T> values) {
54+
// operator+=(boost::span<T>(values)); }
5755

5856
void operator+=(const boost::span<T> values) {
5957
// template <class S>
@@ -81,31 +79,32 @@ struct multi_weight_value : public multi_weight_base<T, std::vector<T>> {
8179

8280
multi_weight_value(const boost::span<T> values) {
8381
this->assign(values.begin(), values.end());
84-
}
82+
}
8583
multi_weight_value() = default;
8684

8785
void operator()(const boost::span<T> values) { operator+=(values); }
8886

89-
//template <class S>
90-
//bool operator==(const S values) const {
91-
// if(values.size() != this->size())
92-
// return false;
93-
//
87+
// template <class S>
88+
// bool operator==(const S values) const {
89+
// if(values.size() != this->size())
90+
// return false;
91+
//
9492
// return std::equal(this->begin(), this->end(), values.begin());
9593
//}
96-
//
97-
//template <class S>
98-
//bool operator!=(const S values) const {
94+
//
95+
// template <class S>
96+
// bool operator!=(const S values) const {
9997
// return !operator==(values);
10098
//}
101-
//
102-
//void operator+=(const std::vector<T> values) { operator+=(boost::span<T>(values)); }
103-
104-
//template <class S>
105-
//void operator+=(const S values) {
99+
//
100+
// void operator+=(const std::vector<T> values) {
101+
// operator+=(boost::span<T>(values)); }
102+
103+
// template <class S>
104+
// void operator+=(const S values) {
106105
void operator+=(const boost::span<T> values) {
107106
if(values.size() != this->size()) {
108-
if (this->size() > 0) {
107+
if(this->size() > 0) {
109108
throw std::runtime_error("size does not match");
110109
}
111110
this->assign(values.begin(), values.end());

0 commit comments

Comments
 (0)