DRTVWR-494: Encapsulate redundant VS boilerplate around <mutex>.

meow-7.2.2
Nat Goodspeed 2019-12-03 11:45:14 -05:00
parent 0c42f50d6b
commit b080b06b42
6 changed files with 27 additions and 54 deletions

View File

@ -41,17 +41,7 @@
#include "llstring.h"
#if LL_WINDOWS
#pragma warning (push)
#pragma warning (disable:4265)
#endif
// warning C4265: 'std::_Pad' : class has virtual functions, but destructor is not virtual
#include <mutex>
#if LL_WINDOWS
#pragma warning (pop)
#endif
#include "mutex.h"
struct apr_dso_handle_t;
/**

View File

@ -35,16 +35,7 @@
#include <memory>
#include <type_traits>
#if LL_WINDOWS
#pragma warning (push)
#pragma warning (disable:4265)
#endif
// 'std::_Pad' : class has virtual functions, but destructor is not virtual
#include <mutex>
#if LL_WINDOWS
#pragma warning (pop)
#endif
#include "mutex.h"
#include <boost/iterator/transform_iterator.hpp>
#include <boost/iterator/indirect_iterator.hpp>

View File

@ -30,18 +30,9 @@
#include "stdtypes.h"
#include <boost/noncopyable.hpp>
#if LL_WINDOWS
#pragma warning (push)
#pragma warning (disable:4265)
#endif
// 'std::_Pad' : class has virtual functions, but destructor is not virtual
#include <mutex>
#include "mutex.h"
#include <condition_variable>
#if LL_WINDOWS
#pragma warning (pop)
#endif
//============================================================================
#define MUTEX_DEBUG (LL_DEBUG || LL_RELEASE_WITH_DEBUG_INFO)

View File

@ -30,18 +30,7 @@
#include <list>
#include <vector>
#include <typeinfo>
#if LL_WINDOWS
#pragma warning (push)
#pragma warning (disable:4265)
#endif
// warning C4265: 'std::_Pad' : class has virtual functions, but destructor is not virtual
#include <mutex>
#if LL_WINDOWS
#pragma warning (pop)
#endif
#include "mutex.h"
class LLSingletonBase: private boost::noncopyable
{

View File

@ -30,19 +30,9 @@
#include "llexception.h"
#include <deque>
#include <string>
#if LL_WINDOWS
#pragma warning (push)
#pragma warning (disable:4265)
#endif
// 'std::_Pad' : class has virtual functions, but destructor is not virtual
#include <mutex>
#include "mutex.h"
#include <condition_variable>
#if LL_WINDOWS
#pragma warning (pop)
#endif
//
// A general queue exception.
//

22
indra/llcommon/mutex.h Normal file
View File

@ -0,0 +1,22 @@
/**
* @file mutex.h
* @author Nat Goodspeed
* @date 2019-12-03
* @brief Wrap <mutex> in odious boilerplate
*
* $LicenseInfo:firstyear=2019&license=viewerlgpl$
* Copyright (c) 2019, Linden Research, Inc.
* $/LicenseInfo$
*/
#if LL_WINDOWS
#pragma warning (push)
#pragma warning (disable:4265)
#endif
// warning C4265: 'std::_Pad' : class has virtual functions, but destructor is not virtual
#include <mutex>
#if LL_WINDOWS
#pragma warning (pop)
#endif