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:
parent
d15d88af71
commit
ec0554e131
@ -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)
|
||||
|
@ -32,7 +32,6 @@ public:
|
||||
|
||||
static UpdateManager& GetInstance();
|
||||
static void Start();
|
||||
static void Stop();
|
||||
|
||||
void getUpdates();
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user