- 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:
parent
794fd6ba56
commit
39ea27e017
5 changed files with 28 additions and 8 deletions
|
@ -73,6 +73,9 @@ namespace Loki
|
||||||
PrintfState(Device dev, const Char * format)
|
PrintfState(Device dev, const Char * format)
|
||||||
: device_(dev)
|
: device_(dev)
|
||||||
, format_(format)
|
, format_(format)
|
||||||
|
, width_(0)
|
||||||
|
, prec_(0)
|
||||||
|
, flags_(0)
|
||||||
, result_(0) {
|
, result_(0) {
|
||||||
Advance();
|
Advance();
|
||||||
}
|
}
|
||||||
|
@ -560,6 +563,10 @@ namespace Loki
|
||||||
#endif //SAFEFORMAT_H_
|
#endif //SAFEFORMAT_H_
|
||||||
|
|
||||||
// $Log$
|
// $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
|
// Revision 1.22 2006/01/16 19:05:09 rich_sposato
|
||||||
// Added cvs keywords.
|
// Added cvs keywords.
|
||||||
//
|
//
|
||||||
|
|
|
@ -60,11 +60,11 @@ namespace Loki
|
||||||
|
|
||||||
// The storage policy doesn't initialize the stored pointer
|
// The storage policy doesn't initialize the stored pointer
|
||||||
// which will be initialized by the OwnershipPolicy's Clone fn
|
// which will be initialized by the OwnershipPolicy's Clone fn
|
||||||
DefaultSPStorage(const DefaultSPStorage&)
|
DefaultSPStorage(const DefaultSPStorage&) : pointee_(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <class U>
|
template <class U>
|
||||||
DefaultSPStorage(const DefaultSPStorage<U>&)
|
DefaultSPStorage(const DefaultSPStorage<U>&) : pointee_(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
DefaultSPStorage(const StoredType& p) : pointee_(p) {}
|
DefaultSPStorage(const StoredType& p) : pointee_(p) {}
|
||||||
|
@ -114,9 +114,9 @@ namespace Loki
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RefCounted()
|
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_);
|
assert(pCount_);
|
||||||
*pCount_ = 1;
|
*pCount_ = 1;
|
||||||
}
|
}
|
||||||
|
@ -1336,6 +1336,10 @@ namespace std
|
||||||
#endif // SMARTPTR_INC_
|
#endif // SMARTPTR_INC_
|
||||||
|
|
||||||
// $Log$
|
// $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
|
// Revision 1.9 2006/01/16 19:05:09 rich_sposato
|
||||||
// Added cvs keywords.
|
// Added cvs keywords.
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
OBJ = Singleton.o SmallObj.o OrderedStatic.o SafeFormat.o
|
OBJ = Singleton.o SmallObj.o OrderedStatic.o SafeFormat.o
|
||||||
BIN = ../lib/libloki.a
|
BIN = ../lib/libloki.a
|
||||||
CXXFLAGS = -Wall -O2
|
CXXFLAGS = -Wall -Weffc++ -pedantic -O2
|
||||||
CPPFLAGS = -I../include -DNDEBUG
|
CPPFLAGS = -I../include -DNDEBUG
|
||||||
|
|
||||||
$(BIN): $(OBJ)
|
$(BIN): $(OBJ)
|
||||||
|
|
|
@ -30,6 +30,7 @@ namespace Loki
|
||||||
|
|
||||||
|
|
||||||
OrderedStaticManagerClass::OrderedStaticManagerClass() :
|
OrderedStaticManagerClass::OrderedStaticManagerClass() :
|
||||||
|
staticObjects_(),
|
||||||
max_longevity_(std::numeric_limits<unsigned int>::min()),
|
max_longevity_(std::numeric_limits<unsigned int>::min()),
|
||||||
min_longevity_(std::numeric_limits<unsigned int>::max())
|
min_longevity_(std::numeric_limits<unsigned int>::max())
|
||||||
{
|
{
|
||||||
|
@ -61,10 +62,8 @@ namespace Loki
|
||||||
}
|
}
|
||||||
|
|
||||||
OrderedStaticManagerClass::Data::Data(unsigned int l, OrderedStaticCreatorFunc* o, Creator f)
|
OrderedStaticManagerClass::Data::Data(unsigned int l, OrderedStaticCreatorFunc* o, Creator f)
|
||||||
|
: longevity(l), object(o), creator(f)
|
||||||
{
|
{
|
||||||
longevity = l;
|
|
||||||
object = o;
|
|
||||||
creator = f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace Private
|
}//namespace Private
|
||||||
|
@ -72,6 +71,10 @@ namespace Loki
|
||||||
}//namespace Loki
|
}//namespace Loki
|
||||||
|
|
||||||
// $Log$
|
// $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
|
// Revision 1.5 2006/01/16 20:59:53 rich_sposato
|
||||||
// Added cvs keywords.
|
// Added cvs keywords.
|
||||||
//
|
//
|
||||||
|
|
|
@ -543,6 +543,8 @@ bool Chunk::IsBlockAvailable( void * p, unsigned char numBlocks,
|
||||||
|
|
||||||
FixedAllocator::FixedAllocator()
|
FixedAllocator::FixedAllocator()
|
||||||
: blockSize_( 0 )
|
: blockSize_( 0 )
|
||||||
|
, numBlocks_( 0 )
|
||||||
|
, chunks_( 0 )
|
||||||
, allocChunk_( NULL )
|
, allocChunk_( NULL )
|
||||||
, deallocChunk_( NULL )
|
, deallocChunk_( NULL )
|
||||||
, emptyChunk_( NULL )
|
, emptyChunk_( NULL )
|
||||||
|
@ -1220,6 +1222,10 @@ bool SmallObjAllocator::IsCorrupt( void ) const
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// $Log$
|
// $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
|
// Revision 1.25 2006/01/09 07:27:00 syntheticpp
|
||||||
// replace tabs
|
// replace tabs
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue