- Disabled -Weffc++ flag, fixing these warnings produces too much useless code
- Enabled -pedantic, -Wold-style-cast and -Wundef for src/ and test/ git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@499 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
7acf9ff6be
commit
c68642eb5f
25 changed files with 83 additions and 56 deletions
|
@ -358,7 +358,7 @@ void test_vect5()
|
|||
|
||||
void test_vect6()
|
||||
{
|
||||
srand( (unsigned int) time(NULL) );
|
||||
srand( static_cast<unsigned int>(time(NULL)) );
|
||||
typedef Loki::AssocVector<int, int> IntMap;
|
||||
|
||||
const unsigned int numTests = 20;
|
||||
|
|
|
@ -57,9 +57,9 @@ namespace FactoryTestPrivate
|
|||
{
|
||||
FactoryType factory;
|
||||
|
||||
factory.Register(1, (Shape * (*)()) createPolygon);
|
||||
factory.Register(2, (Shape * (*)()) createCircle);
|
||||
factory.Register(3, (Shape * (*)()) createLine);
|
||||
factory.Register(1, reinterpret_cast<Shape* (*)()>(createPolygon));
|
||||
factory.Register(2, reinterpret_cast<Shape* (*)()>(createCircle));
|
||||
factory.Register(3, reinterpret_cast<Shape* (*)()>(createLine));
|
||||
|
||||
Shape *s;
|
||||
|
||||
|
@ -96,9 +96,9 @@ namespace FactoryTestPrivate
|
|||
{
|
||||
CloneFactoryType factory;
|
||||
|
||||
factory.Register(Loki::TypeInfo(typeid(Polygon)), (Shape * (*)(const Shape *)) clonePolygon);
|
||||
factory.Register(Loki::TypeInfo(typeid(Circle)), (Shape * (*)(const Shape *)) cloneCircle);
|
||||
factory.Register(Loki::TypeInfo(typeid(Line)), (Shape * (*)(const Shape *)) cloneLine);
|
||||
factory.Register(Loki::TypeInfo(typeid(Polygon)), reinterpret_cast<Shape* (*)(const Shape*)>(clonePolygon));
|
||||
factory.Register(Loki::TypeInfo(typeid(Circle)), reinterpret_cast<Shape* (*)(const Shape*)>(cloneCircle));
|
||||
factory.Register(Loki::TypeInfo(typeid(Line)), reinterpret_cast<Shape* (*)(const Shape*)>(cloneLine));
|
||||
|
||||
Polygon p;
|
||||
Circle c;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BIN = Test
|
||||
CXXFLAGS = -Wall -O2
|
||||
CXXFLAGS = -Wall -Wold-style-cast -Wundef -pedantic -O2
|
||||
CPPFLAGS = -I../../include -DNDEBUG
|
||||
LDFLAGS = -L../../lib
|
||||
LDLIBS = -lloki
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
testAssert("TypeAt",r,result);
|
||||
|
||||
#if !(_MSC_VER && !__INTEL_COMPILER && !__MWERKS__ && _MSC_VER < 1300)
|
||||
#if !(defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) && _MSC_VER < 1300)
|
||||
|
||||
// TypeAtNonStrict works like TypeAt on MSVC 6.0
|
||||
|
||||
|
@ -79,7 +79,7 @@ public:
|
|||
|
||||
testAssert("IndexOf",r,result);
|
||||
|
||||
#if !(_MSC_VER && !__INTEL_COMPILER && !__MWERKS__ && _MSC_VER < 1300)
|
||||
#if !(defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) && _MSC_VER < 1300)
|
||||
|
||||
// Append, Erase, EraseAll, NoDuplicates, Replace, ReplaceAll, Reverse,
|
||||
// MostDerived and DerivedToFront doesn't work on MSVC 6.0
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
|
||||
testAssert("TypeAt",r,result);
|
||||
|
||||
#if !(_MSC_VER && !__INTEL_COMPILER && !__MWERKS__ && _MSC_VER < 1300)
|
||||
#if !(defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) && _MSC_VER < 1300)
|
||||
|
||||
// TypeAtNonStrict works like TypeAt on MSVC 6.0
|
||||
|
||||
|
@ -90,7 +90,7 @@ public:
|
|||
|
||||
testAssert("IndexOf",r,result);
|
||||
|
||||
#if !(_MSC_VER && !__INTEL_COMPILER && !__MWERKS__ && _MSC_VER < 1300)
|
||||
#if !(defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) && _MSC_VER < 1300)
|
||||
|
||||
// Append, Erase, EraseAll, NoDuplicates, Replace, ReplaceAll, Reverse,
|
||||
// MostDerived and DerivedToFront doesn't work on MSVC 6.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue