1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-01 08:29:27 +02:00

Add some recommends and delete extra static methods.

This commit is contained in:
gera 2021-06-11 17:48:29 +03:00 committed by Paul Licameli
parent d15d88af71
commit ec0554e131
3 changed files with 7 additions and 17 deletions

View File

@ -32,14 +32,10 @@ END_EVENT_TABLE()
UpdateManager::UpdateManager()
: mTrackingInterval(
std::chrono::milliseconds(std::chrono::hours(12)).count())
{
mTimer.SetOwner(this, ID_TIMER);
}
{}
UpdateManager::~UpdateManager()
{
Stop();
}
{}
UpdateManager& UpdateManager::GetInstance()
{
@ -52,16 +48,11 @@ void UpdateManager::Start()
{
auto& instance = GetInstance();
if (!instance.mTimer.IsRunning())
static std::once_flag flag;
std::call_once(flag, [&instance] {
instance.mTimer.SetOwner(&instance, ID_TIMER);
instance.mTimer.StartOnce();
}
void UpdateManager::Stop()
{
auto& instance = GetInstance();
if (instance.mTimer.IsRunning())
instance.mTimer.Stop();
});
}
void UpdateManager::enableUpdatesChecking(bool enable)

View File

@ -32,7 +32,6 @@ public:
static UpdateManager& GetInstance();
static void Start();
static void Stop();
void getUpdates();

View File

@ -10,7 +10,7 @@
#include <wx/arrstr.h>
/// A class, that support base manipulation with version number.
/// A class, that supports base manipulation with version number.
/**
By default initialized by zero version number (Version = 0, Release = 0, Revision = 0),
that not allow us to update.