move unreachable code warnings

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@282 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
syntheticpp 2005-10-05 09:57:37 +00:00
parent d0e75dd3b1
commit 2171d8a7b8
2 changed files with 20 additions and 4 deletions

View file

@ -21,6 +21,12 @@
#include "AssocVector.h"
#include "SmallObj.h"
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4702)
//unreachable code if OnUnknownType throws an exception
#endif
namespace Loki
{
@ -733,6 +739,10 @@ namespace Loki
};
} // namespace Loki
#ifdef _MSC_VER
#pragma warning( pop )
#endif
////////////////////////////////////////////////////////////////////////////////
// Change log:
// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
@ -747,6 +757,9 @@ namespace Loki
#endif // FACTORY_INC_
// $Log$
// Revision 1.7 2005/10/05 09:57:37 syntheticpp
// move unreachable code warnings
//
// Revision 1.6 2005/09/26 07:33:04 syntheticpp
// move macros into LOKI_ namespace
//

View file

@ -194,11 +194,13 @@ namespace Loki
template <class T> struct CreateStatic
{
#if defined(_MSC_VER) && _MSC_VER >= 1300
#ifdef _MSC_VER
#pragma warning( push )
// alignment of a member was sensitive to packing
#pragma warning( disable : 4121 )
// alignment of a member was sensitive to packing
#endif // _MSC_VER
union MaxAlign
{
char t_[sizeof(T)];
@ -212,7 +214,8 @@ namespace Loki
int Test::* pMember_;
int (Test::*pMemberFn_)(int);
};
#if defined(_MSC_VER) && _MSC_VER >= 1300
#ifdef _MSC_VER
#pragma warning( pop )
#endif // _MSC_VER
@ -432,8 +435,8 @@ namespace Loki
{
if (destroyed_)
{
destroyed_ = false;
LifetimePolicy<T>::OnDeadReference();
destroyed_ = false;
}
pInstance_ = CreationPolicy<T>::Create();
LifetimePolicy<T>::ScheduleDestruction(pInstance_,