mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
add TVMET_UNUSED macro, as a Q_UNUSED replacement. Use it to shut down warnings
in NumericTraits.h.
This commit is contained in:
@@ -135,7 +135,7 @@ struct NumericTraits<char> {
|
||||
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<unsigned char> {
|
||||
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<short int> {
|
||||
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<short unsigned int> {
|
||||
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<int> {
|
||||
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<unsigned int> {
|
||||
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<long> {
|
||||
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<unsigned long> {
|
||||
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<float> {
|
||||
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<double> {
|
||||
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<long double> {
|
||||
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; }
|
||||
|
||||
@@ -26,7 +26,11 @@
|
||||
|
||||
#include <tvmet/config.h>
|
||||
|
||||
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user