- Compile library with -Weffc++ and -pedantic (gcc)

- Fix most issues raised by using -Weffc++ (initialization lists)


git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@494 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
lfittl 2006-01-18 17:21:31 +00:00
parent 794fd6ba56
commit 39ea27e017
5 changed files with 28 additions and 8 deletions

View file

@ -73,6 +73,9 @@ namespace Loki
PrintfState(Device dev, const Char * format)
: device_(dev)
, format_(format)
, width_(0)
, prec_(0)
, flags_(0)
, result_(0) {
Advance();
}
@ -560,6 +563,10 @@ namespace Loki
#endif //SAFEFORMAT_H_
// $Log$
// Revision 1.23 2006/01/18 17:21:31 lfittl
// - Compile library with -Weffc++ and -pedantic (gcc)
// - Fix most issues raised by using -Weffc++ (initialization lists)
//
// Revision 1.22 2006/01/16 19:05:09 rich_sposato
// Added cvs keywords.
//

View file

@ -60,11 +60,11 @@ namespace Loki
// The storage policy doesn't initialize the stored pointer
// which will be initialized by the OwnershipPolicy's Clone fn
DefaultSPStorage(const DefaultSPStorage&)
DefaultSPStorage(const DefaultSPStorage&) : pointee_(0)
{}
template <class U>
DefaultSPStorage(const DefaultSPStorage<U>&)
DefaultSPStorage(const DefaultSPStorage<U>&) : pointee_(0)
{}
DefaultSPStorage(const StoredType& p) : pointee_(p) {}
@ -114,9 +114,9 @@ namespace Loki
{
public:
RefCounted()
: pCount_(static_cast<unsigned int*>(
SmallObject<>::operator new(sizeof(unsigned int))))
{
pCount_ = static_cast<unsigned int*>(
SmallObject<>::operator new(sizeof(unsigned int)));
assert(pCount_);
*pCount_ = 1;
}
@ -1336,6 +1336,10 @@ namespace std
#endif // SMARTPTR_INC_
// $Log$
// Revision 1.10 2006/01/18 17:21:31 lfittl
// - Compile library with -Weffc++ and -pedantic (gcc)
// - Fix most issues raised by using -Weffc++ (initialization lists)
//
// Revision 1.9 2006/01/16 19:05:09 rich_sposato
// Added cvs keywords.
//

View file

@ -1,6 +1,6 @@
OBJ = Singleton.o SmallObj.o OrderedStatic.o SafeFormat.o
BIN = ../lib/libloki.a
CXXFLAGS = -Wall -O2
CXXFLAGS = -Wall -Weffc++ -pedantic -O2
CPPFLAGS = -I../include -DNDEBUG
$(BIN): $(OBJ)

View file

@ -30,6 +30,7 @@ namespace Loki
OrderedStaticManagerClass::OrderedStaticManagerClass() :
staticObjects_(),
max_longevity_(std::numeric_limits<unsigned int>::min()),
min_longevity_(std::numeric_limits<unsigned int>::max())
{
@ -61,10 +62,8 @@ namespace Loki
}
OrderedStaticManagerClass::Data::Data(unsigned int l, OrderedStaticCreatorFunc* o, Creator f)
: longevity(l), object(o), creator(f)
{
longevity = l;
object = o;
creator = f;
}
}//namespace Private
@ -72,6 +71,10 @@ namespace Loki
}//namespace Loki
// $Log$
// Revision 1.6 2006/01/18 17:21:31 lfittl
// - Compile library with -Weffc++ and -pedantic (gcc)
// - Fix most issues raised by using -Weffc++ (initialization lists)
//
// Revision 1.5 2006/01/16 20:59:53 rich_sposato
// Added cvs keywords.
//

View file

@ -543,6 +543,8 @@ bool Chunk::IsBlockAvailable( void * p, unsigned char numBlocks,
FixedAllocator::FixedAllocator()
: blockSize_( 0 )
, numBlocks_( 0 )
, chunks_( 0 )
, allocChunk_( NULL )
, deallocChunk_( NULL )
, emptyChunk_( NULL )
@ -1220,6 +1222,10 @@ bool SmallObjAllocator::IsCorrupt( void ) const
////////////////////////////////////////////////////////////////////////////////
// $Log$
// Revision 1.26 2006/01/18 17:21:31 lfittl
// - Compile library with -Weffc++ and -pedantic (gcc)
// - Fix most issues raised by using -Weffc++ (initialization lists)
//
// Revision 1.25 2006/01/09 07:27:00 syntheticpp
// replace tabs
//