From 5a3972d80482dc9360663ad27d47180f96b10990 Mon Sep 17 00:00:00 2001 From: syntheticpp Date: Mon, 9 Jan 2006 07:27:01 +0000 Subject: [PATCH] replace tabs git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@452 7ec92016-0320-0410-acc4-a06ded1c099a --- include/loki/Functor.h | 14 +++++------ src/SmallObj.cpp | 7 ++++-- test/Factory/Factory.cpp | 15 +++++++----- test/ScopeGuard/main.cpp | 38 ++++++++++++++--------------- test/Visitor/main.cpp | 52 ++++++++++++++++++++-------------------- 5 files changed, 66 insertions(+), 60 deletions(-) diff --git a/include/loki/Functor.h b/include/loki/Functor.h index fff1f60..0d4232e 100644 --- a/include/loki/Functor.h +++ b/include/loki/Functor.h @@ -1350,19 +1350,19 @@ namespace Loki }; - template + template struct BinderFirstBoundTypeStorage; - template + template struct BinderFirstBoundTypeStorage { typedef typename TypeTraits::ParameterType RefOrValue; }; - - template class ThreadingModel> + + template class ThreadingModel> struct BinderFirstBoundTypeStorage< Functor > { - typedef Functor OriginalFunctor; + typedef Functor OriginalFunctor; typedef const typename TypeTraits::ReferredType RefOrValue; }; @@ -1383,7 +1383,7 @@ namespace Loki typedef typename Private::BinderFirstTraits::Impl Base; typedef typename OriginalFunctor::ResultType ResultType; - typedef typename OriginalFunctor::Parm1 BoundType; + typedef typename OriginalFunctor::Parm1 BoundType; typedef typename Private::BinderFirstBoundTypeStorage< typename Private::BinderFirstTraits @@ -1491,7 +1491,7 @@ namespace Loki typename Private::BinderFirstTraits::BoundFunctorType BindFirst( const Fctor& fun, - typename Fctor::Parm1 bound) + typename Fctor::Parm1 bound) { typedef typename Private::BinderFirstTraits::BoundFunctorType Outgoing; diff --git a/src/SmallObj.cpp b/src/SmallObj.cpp index 80a6f2f..1d7abe3 100644 --- a/src/SmallObj.cpp +++ b/src/SmallObj.cpp @@ -500,8 +500,8 @@ bool Chunk::IsCorrupt( unsigned char numBlocks, std::size_t blockSize, bool Chunk::IsBlockAvailable( void * p, unsigned char numBlocks, std::size_t blockSize ) const { - (void) numBlocks; - + (void) numBlocks; + if ( IsFilled() ) return false; @@ -1220,6 +1220,9 @@ bool SmallObjAllocator::IsCorrupt( void ) const //////////////////////////////////////////////////////////////////////////////// // $Log$ +// Revision 1.25 2006/01/09 07:27:00 syntheticpp +// replace tabs +// // Revision 1.24 2006/01/07 03:24:10 lfittl // Removed useless "using namespace Loki;". // diff --git a/test/Factory/Factory.cpp b/test/Factory/Factory.cpp index 8a17994..994f087 100755 --- a/test/Factory/Factory.cpp +++ b/test/Factory/Factory.cpp @@ -243,7 +243,7 @@ void heap_debug() int main() { - heap_debug(); + heap_debug(); reg(); @@ -281,14 +281,14 @@ int main() p= PFactoryFunctorParm::Instance().CreateObject( 1, func2, 64,64 ); delete p; - + cout << endl; - cout << "Registered ids: \n"; + cout << "Registered ids: \n"; - std::vector ids = PFactory::Instance().RegisteredIds(); + std::vector ids = PFactory::Instance().RegisteredIds(); - for(std::vector::iterator it=ids.begin(); it!=ids.end(); ++it) - cout << *it << "\n"; + for(std::vector::iterator it=ids.begin(); it!=ids.end(); ++it) + cout << *it << "\n"; cout << endl; @@ -303,6 +303,9 @@ int main() // $Log$ +// Revision 1.13 2006/01/09 07:27:01 syntheticpp +// replace tabs +// // Revision 1.12 2006/01/05 00:23:43 syntheticpp // always use #include , Thanks to Lukas Fittl // diff --git a/test/ScopeGuard/main.cpp b/test/ScopeGuard/main.cpp index e757436..56e61db 100755 --- a/test/ScopeGuard/main.cpp +++ b/test/ScopeGuard/main.cpp @@ -21,38 +21,38 @@ struct UserDatabase { - void AddFriend(const std::string&, const std::string&) - { - throw 55; - } + void AddFriend(const std::string&, const std::string&) + { + throw 55; + } }; class User { public: - User(UserDatabase* db) : pDB_(db){} + User(UserDatabase* db) : pDB_(db){} - std::string GetName(); + std::string GetName(); void AddFriend(User& newFriend); - void AddFriendGuarded(User& newFriend); + void AddFriendGuarded(User& newFriend); - size_t countFriends(); + size_t countFriends(); private: - typedef std::vector UserCont; + typedef std::vector UserCont; UserCont friends_; UserDatabase* pDB_; }; std::string User::GetName() { - return "A name"; + return "A name"; } size_t User::countFriends() { - return friends_.size(); + return friends_.size(); } void User::AddFriend(User& newFriend) @@ -64,7 +64,7 @@ void User::AddFriend(User& newFriend) void User::AddFriendGuarded(User& newFriend) { friends_.push_back(&newFriend); - Loki::ScopeGuard guard = Loki::MakeObjGuard(friends_, &UserCont::pop_back); + Loki::ScopeGuard guard = Loki::MakeObjGuard(friends_, &UserCont::pop_back); pDB_->AddFriend(GetName(), newFriend.GetName()); guard.Dismiss(); } @@ -72,18 +72,18 @@ void User::AddFriendGuarded(User& newFriend) int main() { - UserDatabase db; + UserDatabase db; - User u1(&db); - User u2(&db); + User u1(&db); + User u2(&db); - try{ u1.AddFriend(u2); } + try{ u1.AddFriend(u2); } catch (...){} - std::cout << "u1 countFriends: " << u1.countFriends() << "\n"; + std::cout << "u1 countFriends: " << u1.countFriends() << "\n"; - try{ u2.AddFriendGuarded(u1); } + try{ u2.AddFriendGuarded(u1); } catch (...){} - std::cout << "u2 countFriends: " << u2.countFriends() << "\n"; + std::cout << "u2 countFriends: " << u2.countFriends() << "\n"; #if defined(__BORLANDC__) || defined(_MSC_VER) system("PAUSE"); diff --git a/test/Visitor/main.cpp b/test/Visitor/main.cpp index 38d9eea..a107f3b 100755 --- a/test/Visitor/main.cpp +++ b/test/Visitor/main.cpp @@ -19,63 +19,63 @@ class Base : public Loki::BaseVisitable<> { public: - LOKI_DEFINE_VISITABLE() + LOKI_DEFINE_VISITABLE() }; class Type1 : public Base { public: - LOKI_DEFINE_VISITABLE() + LOKI_DEFINE_VISITABLE() }; class VariableVisitor : - public Loki::BaseVisitor, - //public Loki::Visitor, - //public Loki::Visitor - public Loki::Visitor - //public Loki::Visitor::Type> + public Loki::BaseVisitor, + //public Loki::Visitor, + //public Loki::Visitor + public Loki::Visitor + //public Loki::Visitor::Type> { public: - void Visit(Base&){std::cout << "void Visit(Base&)\n";} - void Visit(Type1&){std::cout << "void Visit(Type1&)\n";} + void Visit(Base&){std::cout << "void Visit(Base&)\n";} + void Visit(Type1&){std::cout << "void Visit(Type1&)\n";} }; class CBase : public Loki::BaseVisitable { public: - LOKI_DEFINE_CONST_VISITABLE() + LOKI_DEFINE_CONST_VISITABLE() }; class CType1 : public CBase { public: - LOKI_DEFINE_CONST_VISITABLE() + LOKI_DEFINE_CONST_VISITABLE() }; class CVariableVisitor : - public Loki::BaseVisitor, - //public Loki::Visitor, - //public Loki::Visitor - public Loki::Visitor - //public Loki::Visitor::Type,void,true> + public Loki::BaseVisitor, + //public Loki::Visitor, + //public Loki::Visitor + public Loki::Visitor + //public Loki::Visitor::Type,void,true> { public: - void Visit(const CBase&){std::cout << "void Visit(CBase&)\n";} - void Visit(const CType1&){std::cout << "void Visit(CType1&)\n";} + void Visit(const CBase&){std::cout << "void Visit(CBase&)\n";} + void Visit(const CType1&){std::cout << "void Visit(CType1&)\n";} }; int main() { - VariableVisitor visitor; - Type1 type1; - Base* dyn = &type1; - dyn->Accept(visitor); + VariableVisitor visitor; + Type1 type1; + Base* dyn = &type1; + dyn->Accept(visitor); - CVariableVisitor cvisitor; - CType1 ctype1; - CBase* cdyn = &ctype1; - cdyn->Accept(cvisitor); + CVariableVisitor cvisitor; + CType1 ctype1; + CBase* cdyn = &ctype1; + cdyn->Accept(cvisitor); #if defined(__BORLANDC__) || defined(_MSC_VER) system("PAUSE");