Skip to content

Commit

Permalink
Prevent C++11 compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-webb committed Jan 15, 2025
1 parent 5787b31 commit af69516
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/cpp/threadutility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ struct ThreadUtility::priv_data
Period delay;
TimePoint nextRun;
std::function<void()> f;
int errorCount{ 0 };
bool removed{ false };
int errorCount;
bool removed;
};
using JobStore = std::list<NamedPeriodicFunction>;
JobStore jobs;
Expand Down Expand Up @@ -269,7 +269,7 @@ void ThreadUtility::addPeriodicTask(const LogString& name, std::function<void()>
if (m_priv->maxDelay < delay)
m_priv->maxDelay = delay;
auto currentTime = std::chrono::system_clock::now();
m_priv->jobs.push_back( priv_data::NamedPeriodicFunction{name, delay, currentTime + delay, f} );
m_priv->jobs.push_back( priv_data::NamedPeriodicFunction{name, delay, currentTime + delay, f, 0, false} );
if (!m_priv->thread.joinable())
{
m_priv->terminated = false;
Expand Down

0 comments on commit af69516

Please sign in to comment.