From a006b8c412598ef099cb74a1505cc9e690609278 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 25 Jun 2020 20:14:17 +0200 Subject: [PATCH] Fix time_t <> long int ambiguity, 32bit builds See 7cf68eaf7235aa4ae7f9890aebc6b812759aa00e for a detailed explanation. --- libs/ardour/ardour/plugin_manager.h | 6 +++--- libs/ardour/plugin_manager.cc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/ardour/ardour/plugin_manager.h b/libs/ardour/ardour/plugin_manager.h index 791ae0e0fc..8cf593355b 100644 --- a/libs/ardour/ardour/plugin_manager.h +++ b/libs/ardour/ardour/plugin_manager.h @@ -75,7 +75,7 @@ public: bool no_timeout () { return _cancel_timeout; } void stats_use_plugin (PluginInfoPtr const&); - bool stats (PluginInfoPtr const&, time_t& lru, uint64_t& use_count) const; + bool stats (PluginInfoPtr const&, int64_t& lru, uint64_t& use_count) const; void save_stats (); enum PluginStatusType { @@ -172,10 +172,10 @@ private: struct PluginStats { PluginType const type; std::string const unique_id; - time_t lru; + int64_t lru; uint64_t use_count; - PluginStats (ARDOUR::PluginType t, std::string const& id, time_t lru = 0, uint64_t use_count = 0) + PluginStats (ARDOUR::PluginType t, std::string const& id, int64_t lru = 0, uint64_t use_count = 0) : type (t), unique_id (id), lru (lru), use_count (use_count) {} bool operator==(const PluginStats& other) const { diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index 16eced44e7..bf36b19e20 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -1631,7 +1631,7 @@ PluginManager::load_stats () { PluginType type; string id; - time_t lru; + int64_t lru; uint64_t use_count; if (!(*i)->get_property (X_("type"), type) || @@ -1691,7 +1691,7 @@ PluginManager::stats_use_plugin (PluginInfoPtr const& pip) } bool -PluginManager::stats (PluginInfoPtr const& pip, time_t& lru, uint64_t& use_count) const +PluginManager::stats (PluginInfoPtr const& pip, int64_t& lru, uint64_t& use_count) const { PluginStats ps (pip->type, pip->unique_id, time (NULL)); PluginStatsList::const_iterator i = find (statistics.begin(), statistics.end(), ps);