Skip to content

Commit 3843a2d

Browse files
authored
Merge pull request #2295 from wlbksy/master
fix more on -Wunused-local-typedef warning
2 parents cbb810d + 4205a0c commit 3843a2d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

include/xtensor/xaxis_iterator.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ namespace xt
104104
auto derive_xstrided_view(CT&& e, typename std::decay_t<CT>::size_type axis, typename std::decay_t<CT>::size_type offset)
105105
{
106106
using xexpression_type = std::decay_t<CT>;
107-
using size_type = typename xexpression_type::size_type;
108107
using shape_type = typename xexpression_type::shape_type;
109108
using strides_type = typename xexpression_type::strides_type;
110109

@@ -237,7 +236,7 @@ namespace xt
237236
/**
238237
* Checks equality of the xaxis_slice_iterator and \c rhs.
239238
*
240-
* @param
239+
* @param
241240
* @return true if the iterators are equivalent, false otherwise
242241
*/
243242
template <class CT>
@@ -290,7 +289,7 @@ namespace xt
290289
*
291290
* @param e the expession to iterate over
292291
* @param axis the axis to iterate over
293-
* @return an instance of xaxis_iterator
292+
* @return an instance of xaxis_iterator
294293
*/
295294
template <class E>
296295
inline auto axis_begin(E&& e, typename std::decay_t<E>::size_type axis)
@@ -320,7 +319,7 @@ namespace xt
320319
*
321320
* @param e the expession to iterate over
322321
* @param axis the axis to iterate over
323-
* @return an instance of xaxis_iterator
322+
* @return an instance of xaxis_iterator
324323
*/
325324
template <class E>
326325
inline auto axis_end(E&& e, typename std::decay_t<E>::size_type axis)

include/xtensor/xhistogram.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,12 @@ namespace xt
494494
return n;
495495
}
496496

497+
#ifdef XTENSOR_ENABLE_ASSERT
497498
using value_type = typename std::decay_t<E>::value_type;
498499

499500
XTENSOR_ASSERT(xt::all(weights >= static_cast<value_type>(0)));
500501
XTENSOR_ASSERT(xt::sum(weights)() > static_cast<value_type>(0));
502+
#endif
501503

502504
xt::xtensor<double, 1> P = xt::cast<double>(weights) / static_cast<double>(xt::sum(weights)());
503505
xt::xtensor<size_t, 1> n = xt::ceil(static_cast<double>(N) * P);

0 commit comments

Comments
 (0)