Skip to content
Snippets Groups Projects
Commit dff86fad authored by Drake Arconis's avatar Drake Arconis
Browse files

changed: Minor cleanup of llatomic, add support for using std::atomic too

parent 0e544c41
No related branches found
No related tags found
No related merge requests found
...@@ -28,19 +28,21 @@ ...@@ -28,19 +28,21 @@
#pragma once #pragma once
#include "stdtypes.h" #include "stdtypes.h"
#define AL_CXX_ATOMICS 1
#define AL_BOOST_ATOMICS 1 #define AL_BOOST_ATOMICS 1
#if (__cplusplus >= 201103L || _MSC_VER >= 1800) #if AL_CXX_ATOMICS && (__cplusplus >= 201103L || _MSC_VER >= 1800)
#if AL_BOOST_ATOMICS #if AL_BOOST_ATOMICS
#include <boost/atomic.hpp> #include <boost/atomic.hpp>
#elif AL_STD_ATOMICS
#include <boost/atomic.hpp>
#endif
template<typename Type> template<typename Type>
using LLAtomic32 = boost::atomic<Type>; using LLAtomic32 = boost::atomic<Type>;
#elif AL_STD_ATOMICS
#include <atomic>
template<typename Type>
using LLAtomic32 = std::atomic<Type>;
#endif
#else #else
#include "apr_atomic.h" #include <apr_atomic.h>
template <typename Type> class LLAtomic32 template <typename Type> class LLAtomic32
{ {
public: public:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment