Commit 3cb249cd authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

ModificationNotifier: Work around non-standard std::chrono::time_point constructor

parent 245a670c
......@@ -113,7 +113,11 @@ void ModificationNotifier::notifyAlbumTrackRemoval( int64_t trackId )
void ModificationNotifier::run()
{
#if !defined(_LIBCPP_STD_VER) || (_LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR))
constexpr auto ZeroTimeout = std::chrono::time_point<std::chrono::steady_clock>{};
#else
const auto ZeroTimeout = std::chrono::time_point<std::chrono::steady_clock>{};
#endif
// Create some other queue to swap with the ones that are used
// by other threads. That way we can release those early and allow
......
......@@ -124,7 +124,11 @@ private:
void checkQueue( Queue<T>& input, Queue<T>& output, std::chrono::time_point<std::chrono::steady_clock>& nextTimeout,
std::chrono::time_point<std::chrono::steady_clock> now )
{
#if !defined(_LIBCPP_STD_VER) || (_LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR))
constexpr auto ZeroTimeout = std::chrono::time_point<std::chrono::steady_clock>{};
#else
const auto ZeroTimeout = std::chrono::time_point<std::chrono::steady_clock>{};
#endif
// LOG_ERROR( "Input timeout: ", input.timeout.time_since_epoch(), " - Now: ", now.time_since_epoch() );
if ( input.timeout <= now )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment