summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/AsyncRequests.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-04-01 19:01:55 -0400
committerLioncash <mathew1800@gmail.com>2018-04-01 19:06:43 -0400
commit672665dec001edae90fd1dcfdc94a0a54585c4bf (patch)
tree8a3a2a79d8a850a536c2259267853658e90c6f46 /Source/Core/VideoCommon/AsyncRequests.cpp
parentbf8ffe5bfb50ce1d2aa969ea6cc1901dc79a85ec (diff)
AsyncRequests: In-class initialize class members
Prior to this change, it's possible for m_wake_me_up_again to be used while it's in an uninitialized state from the exposed API. e.g. - Using SetEnable after construction would perform an uninitialized read. - Using PushEvent would perform an uninitialized read by way of operator |=. internally, an uninitialized read can happen if PullEventsInternal() is executed before other functions. Just to avoid the whole possibility of performing uninitialized reads, we just give the class member a default value of false.
Diffstat (limited to 'Source/Core/VideoCommon/AsyncRequests.cpp')
-rw-r--r--Source/Core/VideoCommon/AsyncRequests.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/AsyncRequests.cpp b/Source/Core/VideoCommon/AsyncRequests.cpp
index f41354730d..cab79c8bc2 100644
--- a/Source/Core/VideoCommon/AsyncRequests.cpp
+++ b/Source/Core/VideoCommon/AsyncRequests.cpp
@@ -12,9 +12,7 @@
AsyncRequests AsyncRequests::s_singleton;
-AsyncRequests::AsyncRequests() : m_enable(false), m_passthrough(true)
-{
-}
+AsyncRequests::AsyncRequests() = default;
void AsyncRequests::PullEventsInternal()
{