mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
gcc-11 compat, volatile atomic variables (2/2)
GUI part of previous commit.
This commit is contained in:
parent
cc7b8b1bc5
commit
8b4edaa950
5 changed files with 16 additions and 11 deletions
|
|
@ -44,6 +44,7 @@
|
|||
#include <sigc++/signal.h>
|
||||
|
||||
#include "pbd/statefuldestructible.h"
|
||||
#include "pbd/g_atomic_compat.h"
|
||||
|
||||
#include "temporal/beats.h"
|
||||
|
||||
|
|
@ -523,13 +524,14 @@ protected:
|
|||
friend class DisplaySuspender;
|
||||
virtual void suspend_route_redisplay () = 0;
|
||||
virtual void resume_route_redisplay () = 0;
|
||||
gint _suspend_route_redisplay_counter;
|
||||
|
||||
GATOMIC_QUAL gint _suspend_route_redisplay_counter;
|
||||
};
|
||||
|
||||
class DisplaySuspender {
|
||||
public:
|
||||
DisplaySuspender() {
|
||||
if (g_atomic_int_add(&PublicEditor::instance()._suspend_route_redisplay_counter, 1) == 0) {
|
||||
if (g_atomic_int_add (&PublicEditor::instance()._suspend_route_redisplay_counter, 1) == 0) {
|
||||
PublicEditor::instance().suspend_route_redisplay ();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue