From e88c7b29ea9ec9fcd6ac6b15c965085152100d2e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 18 Jun 2017 18:19:17 +0200 Subject: get rid of "volatile" abuse We heavily used "volatile bool" to check if the thread loop should stop. But this functionality is already provided by Qt5's QThread::requestInterruption. In other cases, "volatile" is wonderfully underspecified so it's better to ditch its usage in favor of std::atomic. At the time we don't appear to be using the "volatile" keyword except when calling win32's Interlocked*() family of functions as necessary. In freetrackclient's header the "volatile" qualifier was used as part of a typedef. This doesn't work. Use it as part of data declaration. --- tracker-freepie-udp/ftnoir_tracker_freepie-udp.h | 1 - 1 file changed, 1 deletion(-) (limited to 'tracker-freepie-udp/ftnoir_tracker_freepie-udp.h') diff --git a/tracker-freepie-udp/ftnoir_tracker_freepie-udp.h b/tracker-freepie-udp/ftnoir_tracker_freepie-udp.h index 5a98e194..51a710f8 100644 --- a/tracker-freepie-udp/ftnoir_tracker_freepie-udp.h +++ b/tracker-freepie-udp/ftnoir_tracker_freepie-udp.h @@ -42,7 +42,6 @@ private: QUdpSocket sock; settings s; QMutex mtx; - volatile bool should_quit; }; class dialog_freepie : public ITrackerDialog -- cgit v1.2.3