- 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
|
@ -408,13 +408,13 @@ int main()
|
|||
|
||||
void* p;
|
||||
|
||||
p = (void*) &Singleton_with_MySmallObject_DieAs::Instance();
|
||||
p = (void*) &Singleton_MyFunctionObject_DieAs::Instance();
|
||||
p = static_cast<void*>(&Singleton_with_MySmallObject_DieAs::Instance());
|
||||
p = static_cast<void*>(&Singleton_MyFunctionObject_DieAs::Instance());
|
||||
|
||||
std::cout<<"\n";
|
||||
|
||||
p = (void*) &Follower1_Singleton_B1_die_first::Instance();
|
||||
p = (void*) &Follower1_Singleton_B1_die_last::Instance();
|
||||
p = static_cast<void*>(&Follower1_Singleton_B1_die_first::Instance());
|
||||
p = static_cast<void*>(&Follower1_Singleton_B1_die_last::Instance());
|
||||
|
||||
|
||||
// test of FollowIntoDeath policy, not supported by msvc 7.1 compiler
|
||||
|
@ -422,9 +422,9 @@ int main()
|
|||
|
||||
std::cout << "\nMaster1:\n\n";
|
||||
|
||||
p = (void*) &Follower1_Singleton_DefaultLifetime::Instance();
|
||||
p = (void*) &Follower1_Singleton_PhoenixSingleton::Instance();
|
||||
p = (void*) &Follower1_Singleton_DeletableSingleton::Instance();
|
||||
p = static_cast<void*>(&Follower1_Singleton_DefaultLifetime::Instance());
|
||||
p = static_cast<void*>(&Follower1_Singleton_PhoenixSingleton::Instance());
|
||||
p = static_cast<void*>(&Follower1_Singleton_DeletableSingleton::Instance());
|
||||
|
||||
|
||||
std::cout << "\n\nMaster2:\n\n";
|
||||
|
@ -441,7 +441,7 @@ int main()
|
|||
// memory leak when code is enabled
|
||||
//#define ENABLE_MEMORY_LEAK
|
||||
#ifdef ENABLE_MEMORY_LEAK
|
||||
p = (void*) &Follower1_Singleton_NoDestroy::Instance();
|
||||
p = static_cast<void*>(&Follower1_Singleton_NoDestroy::Instance());
|
||||
B2_NoDestroy *no2 = &Follower2_Singleton_NoDestroy::Instance();
|
||||
no2->data = &Master2_NoDestroy::Singleton::Instance();
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
BIN1 = DeletableSingleton
|
||||
BIN2 = Dependencies
|
||||
BIN3 = Phoenix
|
||||
CXXFLAGS = -Wall -O2
|
||||
CXXFLAGS = -Wall -Wold-style-cast -Wundef -pedantic -O2
|
||||
CPPFLAGS = -I../../include -DNDEBUG
|
||||
LDFLAGS = -L../../lib
|
||||
LDLIBS = -lloki
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue