remove warnings by gouarin · Pull Request #2885 · xtensor-stack/xtensor
| EXPECT_TRUE(allclose(cmplexpected_angle, cmplres_angle)); | ||
|
|
||
| using assign_t_angle = xassign_traits<xarray<double>, decltype(cmplres_angle)>; | ||
| (void) sizeof(assign_t_angle); // to avoid unused warning |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the definition where it is used instead of this horrible hack.
| EXPECT_TRUE(allclose(cmplexpected_conj, cmplres_conj)); | ||
|
|
||
| using assign_t_conj = xassign_traits<xarray<std::complex<double>>, decltype(cmplres_conj)>; | ||
| (void) sizeof(assign_t_conj); // to avoid unused warning |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark here
| }; | ||
|
|
||
| using assign_t_norm = xassign_traits<xarray<double>, decltype(cmplres_norm)>; | ||
| (void) sizeof(assign_t_norm); // to avoid unused warning |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
| } | ||
|
|
||
| using assign_t_arg = xassign_traits<xarray<double>, decltype(cmplres)>; | ||
| (void) sizeof(assign_t_arg); // to avoid unused warning |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
|
|
||
| #define TEST_VALUE_HAS_VALUE(INPUT, V_TYPE, OPTIONAL) \ | ||
| using result_type = std::conditional_t<OPTIONAL, xtl::xoptional<double>, double>; \ | ||
| (void) sizeof(result_type); \ |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not required since result_type is used just below.
| EXPECT_EQ(a, par); | ||
| } | ||
| using assign_traits = xassign_traits<xarray<double>, decltype(av)>; | ||
| (void) sizeof(assign_traits); // to avoid unused warning |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the definition where it is used instead.
| // Suppress unused typedef warnings | ||
| (void) sizeof(ctes); | ||
| (void) sizeof(carr); | ||
| (void) sizeof(cfix); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 3 lines can be removed.
| auto vxa = view(xt::arange<double>(100), range(0, 10)); | ||
|
|
||
| using assign_traits = xassign_traits<decltype(vxt), decltype(b)>; | ||
| (void) sizeof(assign_traits); // suppress unused typedef warning |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the definition where it is used.