Commit 6fe96969 by Sebastian Eichelbaum

[FIX] fixed several compilation warnings, mainly in the tests

parent 249b4700
......@@ -52,14 +52,14 @@ public:
typedef WMatrixFixed< int, 3, 2 > WMI32;
typedef WMatrixFixed< std::size_t, 3, 2 > WMS32;
TS_ASSERT_THROWS_NOTHING( WMD32 matrix() );
TS_ASSERT_THROWS_NOTHING( WMF32 matrix() );
TS_ASSERT_THROWS_NOTHING( WMD11 matrix() );
TS_ASSERT_THROWS_NOTHING( WMF11 matrix() );
TS_ASSERT_THROWS_NOTHING( WMD44 matrix() );
TS_ASSERT_THROWS_NOTHING( WMF44 matrix() );
TS_ASSERT_THROWS_NOTHING( WMI32 matrix() );
TS_ASSERT_THROWS_NOTHING( WMS32 matrix() );
TS_ASSERT_THROWS_NOTHING( WMD32 matrix );
TS_ASSERT_THROWS_NOTHING( WMF32 matrix );
TS_ASSERT_THROWS_NOTHING( WMD11 matrix );
TS_ASSERT_THROWS_NOTHING( WMF11 matrix );
TS_ASSERT_THROWS_NOTHING( WMD44 matrix );
TS_ASSERT_THROWS_NOTHING( WMF44 matrix );
TS_ASSERT_THROWS_NOTHING( WMI32 matrix );
TS_ASSERT_THROWS_NOTHING( WMS32 matrix );
}
/**
......
......@@ -66,7 +66,7 @@ public:
typedef WTensorBase< 0, 0, int > T00;
// standard constructor should never throw
TS_ASSERT_THROWS_NOTHING( T12 t12() );
TS_ASSERT_THROWS_NOTHING( T12 t12 );
T12 t12;
// number of data elements should be 2
......@@ -82,7 +82,7 @@ public:
}
// do the same for some more tensors
TS_ASSERT_THROWS_NOTHING( T23 t23() );
TS_ASSERT_THROWS_NOTHING( T23 t23 );
T23 t23;
ds = T23::dataSize;
TS_ASSERT_EQUALS( ds, 9 );
......@@ -91,7 +91,7 @@ public:
TS_ASSERT_EQUALS( t23.m_data[ k ], 0.0f );
}
TS_ASSERT_THROWS_NOTHING( T42 t42() );
TS_ASSERT_THROWS_NOTHING( T42 t42 );
T42 t42;
ds = T42::dataSize;
TS_ASSERT_EQUALS( ds, 16 );
......@@ -100,7 +100,7 @@ public:
TS_ASSERT_EQUALS( t42.m_data[ k ], 0 );
}
TS_ASSERT_THROWS_NOTHING( T63 t63() );
TS_ASSERT_THROWS_NOTHING( T63 t63 );
T63 t63;
ds = T63::dataSize;
TS_ASSERT_EQUALS( ds, 729 );
......@@ -109,7 +109,7 @@ public:
TS_ASSERT_EQUALS( t63.m_data[ k ], 0.0 );
}
TS_ASSERT_THROWS_NOTHING( T00 t00() );
TS_ASSERT_THROWS_NOTHING( T00 t00 );
T00 t00;
TS_ASSERT_EQUALS( t00.m_data, 0 );
}
......@@ -998,7 +998,7 @@ public:
typedef WTensorBaseSym< 0, 0, int > T00;
// standard constructor should never throw
TS_ASSERT_THROWS_NOTHING( T12 t12() );
TS_ASSERT_THROWS_NOTHING( T12 t12 );
T12 t12;
// number of data elements should be 2
......@@ -1015,7 +1015,7 @@ public:
// do the same for some more tensors
// symmetric tensors need less memory, 6 instead of 9 values in this case
TS_ASSERT_THROWS_NOTHING( T23 t23() );
TS_ASSERT_THROWS_NOTHING( T23 t23 );
T23 t23;
ds = T23::dataSize;
TS_ASSERT_EQUALS( ds, 6 );
......@@ -1024,7 +1024,7 @@ public:
TS_ASSERT_EQUALS( t23.m_data[ k ], 0.0f );
}
TS_ASSERT_THROWS_NOTHING( T42 t42() );
TS_ASSERT_THROWS_NOTHING( T42 t42 );
T42 t42;
ds = T42::dataSize;
TS_ASSERT_EQUALS( ds, 5 );
......@@ -1033,7 +1033,7 @@ public:
TS_ASSERT_EQUALS( t42.m_data[ k ], 0 );
}
TS_ASSERT_THROWS_NOTHING( T63 t63() );
TS_ASSERT_THROWS_NOTHING( T63 t63 );
T63 t63;
ds = T63::dataSize;
TS_ASSERT_EQUALS( ds, 28 );
......@@ -1042,7 +1042,7 @@ public:
TS_ASSERT_EQUALS( t63.m_data[ k ], 0.0 );
}
TS_ASSERT_THROWS_NOTHING( T00 t00() );
TS_ASSERT_THROWS_NOTHING( T00 t00 );
T00 t00;
TS_ASSERT_EQUALS( t00.m_data, 0 );
}
......
......@@ -43,7 +43,7 @@ public:
*/
void testInstantiation( void )
{
TS_ASSERT_THROWS_NOTHING( WException e() );
TS_ASSERT_THROWS_NOTHING( WException e );
TS_ASSERT_THROWS_NOTHING( WException e( std::string( "Some message" ) ) );
}
......
......@@ -44,7 +44,7 @@ public:
*/
void testInstantiation( void )
{
TS_ASSERT_THROWS_NOTHING( WTerminalColor c() );
TS_ASSERT_THROWS_NOTHING( WTerminalColor c );
TS_ASSERT_THROWS_NOTHING( WTerminalColor( WTerminalColor::Bold, WTerminalColor::FGRed, WTerminalColor::BGNone ) );
}
......
......@@ -40,7 +40,7 @@ public:
*/
void testInstantiation( void )
{
TS_ASSERT_THROWS_NOTHING( WDataSet dataSet() );
TS_ASSERT_THROWS_NOTHING( WDataSet dataSet );
}
};
......
......@@ -51,7 +51,7 @@ public:
void testInstantiation()
{
{
TS_ASSERT_THROWS_NOTHING( WGridTransformOrtho v() );
TS_ASSERT_THROWS_NOTHING( WGridTransformOrtho v );
WGridTransformOrtho v;
TS_ASSERT_EQUALS( v.getOffsetX(), 1.0 );
TS_ASSERT_EQUALS( v.getOffsetY(), 1.0 );
......
......@@ -239,7 +239,7 @@ QWidget* WUIQtWidgetBase::getCompellingQParent() const
bool WUIQtWidgetBase::hasUIParent() const
{
return getQtParent();
return ( getQtParent() != NULL );
}
void WUIQtWidgetBase::addAction( WPropGroup group, WGEImage::SPtr icon )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment