@@ -100,7 +100,7 @@ namespace pcl
100
100
plus (std::remove_const_t <T> &l, const T &r)
101
101
{
102
102
using type = std::remove_all_extents_t <T>;
103
- static const std::uint32_t count = sizeof (T) / sizeof (type);
103
+ constexpr std::uint32_t count = sizeof (T) / sizeof (type);
104
104
for (std::uint32_t i = 0 ; i < count; ++i)
105
105
l[i] += r[i];
106
106
}
@@ -117,7 +117,7 @@ namespace pcl
117
117
plusscalar (T1 &p, const T2 &scalar)
118
118
{
119
119
using type = std::remove_all_extents_t <T1>;
120
- static const std::uint32_t count = sizeof (T1) / sizeof (type);
120
+ constexpr std::uint32_t count = sizeof (T1) / sizeof (type);
121
121
for (std::uint32_t i = 0 ; i < count; ++i)
122
122
p[i] += scalar;
123
123
}
@@ -134,7 +134,7 @@ namespace pcl
134
134
minus (std::remove_const_t <T> &l, const T &r)
135
135
{
136
136
using type = std::remove_all_extents_t <T>;
137
- static const std::uint32_t count = sizeof (T) / sizeof (type);
137
+ constexpr std::uint32_t count = sizeof (T) / sizeof (type);
138
138
for (std::uint32_t i = 0 ; i < count; ++i)
139
139
l[i] -= r[i];
140
140
}
@@ -151,7 +151,7 @@ namespace pcl
151
151
minusscalar (T1 &p, const T2 &scalar)
152
152
{
153
153
using type = std::remove_all_extents_t <T1>;
154
- static const std::uint32_t count = sizeof (T1) / sizeof (type);
154
+ constexpr std::uint32_t count = sizeof (T1) / sizeof (type);
155
155
for (std::uint32_t i = 0 ; i < count; ++i)
156
156
p[i] -= scalar;
157
157
}
@@ -168,7 +168,7 @@ namespace pcl
168
168
mulscalar (T1 &p, const T2 &scalar)
169
169
{
170
170
using type = std::remove_all_extents_t <T1>;
171
- static const std::uint32_t count = sizeof (T1) / sizeof (type);
171
+ constexpr std::uint32_t count = sizeof (T1) / sizeof (type);
172
172
for (std::uint32_t i = 0 ; i < count; ++i)
173
173
p[i] *= scalar;
174
174
}
@@ -185,7 +185,7 @@ namespace pcl
185
185
divscalar (T1 &p, const T2 &scalar)
186
186
{
187
187
using type = std::remove_all_extents_t <T1>;
188
- static const std::uint32_t count = sizeof (T1) / sizeof (type);
188
+ constexpr std::uint32_t count = sizeof (T1) / sizeof (type);
189
189
for (std::uint32_t i = 0 ; i < count; ++i)
190
190
p[i] /= scalar;
191
191
}
@@ -202,7 +202,7 @@ namespace pcl
202
202
divscalar2 (ArrayT &p, const ScalarT &scalar)
203
203
{
204
204
using type = std::remove_all_extents_t <ArrayT>;
205
- static const std::uint32_t count = sizeof (ArrayT) / sizeof (type);
205
+ constexpr std::uint32_t count = sizeof (ArrayT) / sizeof (type);
206
206
for (std::uint32_t i = 0 ; i < count; ++i)
207
207
p[i] = scalar / p[i];
208
208
}
0 commit comments