diff --git a/tvmet-1.7.1/include/tvmet/NumericTraits.h b/tvmet-1.7.1/include/tvmet/NumericTraits.h index 955b189b1..a8232fab6 100644 --- a/tvmet-1.7.1/include/tvmet/NumericTraits.h +++ b/tvmet-1.7.1/include/tvmet/NumericTraits.h @@ -135,7 +135,7 @@ struct NumericTraits { base_type real(argument_type x) { return x; } static inline - base_type imag(argument_type x) { return 0; } + base_type imag(argument_type x) { TVMET_UNUSED(x); return 0; } static inline value_type conj(argument_type x) { return x; } @@ -195,7 +195,7 @@ struct NumericTraits { base_type real(argument_type x) { return x; } static inline - base_type imag(argument_type x) { return 0; } + base_type imag(argument_type x) { TVMET_UNUSED(x); return 0; } static inline base_type abs(argument_type x) { return std::abs(x); } @@ -251,7 +251,7 @@ struct NumericTraits { base_type real(argument_type x) { return x; } static inline - base_type imag(argument_type x) { return 0; } + base_type imag(argument_type x) { TVMET_UNUSED(x); return 0; } static inline value_type conj(argument_type x) { return x; } @@ -315,7 +315,7 @@ struct NumericTraits { base_type real(argument_type x) { return x; } static inline - base_type imag(argument_type x) { return 0; } + base_type imag(argument_type x) { TVMET_UNUSED(x); return 0; } static inline base_type abs(argument_type x) { return std::abs(x); } @@ -371,7 +371,7 @@ struct NumericTraits { base_type real(argument_type x) { return x; } static inline - base_type imag(argument_type x) { return 0; } + base_type imag(argument_type x) { TVMET_UNUSED(x); return 0; } static inline value_type conj(argument_type x) { return x; } @@ -435,7 +435,7 @@ struct NumericTraits { base_type real(argument_type x) { return x; } static inline - base_type imag(argument_type x) { return 0; } + base_type imag(argument_type x) { TVMET_UNUSED(x); return 0; } static inline base_type abs(argument_type x) { return x; } @@ -491,7 +491,7 @@ struct NumericTraits { base_type real(argument_type x) { return x; } static inline - base_type imag(argument_type x) { return 0; } + base_type imag(argument_type x) { TVMET_UNUSED(x); return 0; } static inline value_type conj(argument_type x) { return x; } @@ -555,7 +555,7 @@ struct NumericTraits { base_type real(argument_type x) { return x; } static inline - base_type imag(argument_type x) { return 0; } + base_type imag(argument_type x) { TVMET_UNUSED(x); return 0; } static inline base_type abs(argument_type x) { return x; } @@ -607,7 +607,7 @@ struct NumericTraits { base_type real(argument_type x) { return x; } static inline - base_type imag(argument_type x) { return 0; } + base_type imag(argument_type x) { TVMET_UNUSED(x); return 0; } static inline value_type conj(argument_type x) { return x; } @@ -673,7 +673,7 @@ struct NumericTraits { base_type real(argument_type x) { return x; } static inline - base_type imag(argument_type x) { return 0; } + base_type imag(argument_type x) { TVMET_UNUSED(x); return 0; } static inline value_type conj(argument_type x) { return x; } @@ -736,7 +736,7 @@ struct NumericTraits { base_type real(argument_type x) { return x; } static inline - base_type imag(argument_type x) { return 0; } + base_type imag(argument_type x) { TVMET_UNUSED(x); return 0; } static inline value_type conj(argument_type x) { return x; } diff --git a/tvmet-1.7.1/include/tvmet/tvmet.h b/tvmet-1.7.1/include/tvmet/tvmet.h index 17b845eb4..7e7269a13 100644 --- a/tvmet-1.7.1/include/tvmet/tvmet.h +++ b/tvmet-1.7.1/include/tvmet/tvmet.h @@ -26,7 +26,11 @@ #include - +// this might not work on all platforms. Specifically, Qt uses a +// slightly different solution in the case when compiler==intel && +// os != windows. See in Qt's source code, the definition of Q_UNUSED +// in src/corelib/global/qglobal.h +#define TVMET_UNUSED(x) (void)x /* * other compiler specific stuff