Skip to content

Commit

Permalink
Use push/pop for temporary disabled warning
Browse files Browse the repository at this point in the history
  • Loading branch information
trilorez committed Jun 26, 2017
1 parent 4c8fc3e commit a300650
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion atomicops.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ class weak_atomic
public:
weak_atomic() { }
#ifdef AE_VCPP
#pragma warning(push)
#pragma warning(disable: 4100) // Get rid of (erroneous) 'unreferenced formal parameter' warning
#endif
template<typename U> weak_atomic(U&& x) : value(std::forward<U>(x)) { }
Expand All @@ -239,7 +240,7 @@ class weak_atomic
weak_atomic(weak_atomic const& other) : value(other.value) { }
weak_atomic(weak_atomic&& other) : value(std::move(other.value)) { }
#ifdef AE_VCPP
#pragma warning(default: 4100)
#pragma warning(pop)
#endif

AE_FORCEINLINE operator T() const { return load(); }
Expand Down

0 comments on commit a300650

Please sign in to comment.