13
0

Fix C++11ism (template argument uses local type)

This commit is contained in:
Robin Gareus 2021-07-15 16:18:20 +02:00
parent 12e1c960b6
commit 3c43fe54bb
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 28 additions and 32 deletions

View File

@ -240,9 +240,19 @@ PluginManagerUI::~PluginManagerUI ()
} }
void void
PluginManagerUI::on_show () PluginManagerUI::PluginCount::set (PluginScanLogEntry const& psle)
{ {
ArdourWindow::on_show (); ++total;
if (!psle.recent ()) {
++stale;
return;
}
PluginScanLogEntry::PluginScanResult sr = psle.result ();
if ((int)sr & (PluginScanLogEntry::TimeOut | PluginScanLogEntry::Updated | PluginScanLogEntry::New)) {
++ndscn;
} else if (sr != PluginScanLogEntry::OK) {
++error;
}
} }
static std::string static std::string
@ -329,35 +339,6 @@ PluginManagerUI::refill ()
bool rescan_err = false; bool rescan_err = false;
bool have_stale = false; bool have_stale = false;
struct PluginCount {
PluginCount ()
: total (0)
, error (0)
, stale (0)
, ndscn (0)
{}
void set (PluginScanLogEntry const& psle) {
++total;
if (!psle.recent ()) {
++stale;
return;
}
PluginScanLogEntry::PluginScanResult sr = psle.result ();
if ((int)sr & (PluginScanLogEntry::TimeOut | PluginScanLogEntry::Updated | PluginScanLogEntry::New)) {
++ndscn;
} else if (sr != PluginScanLogEntry::OK) {
++error;
}
}
unsigned int total;
unsigned int error;
unsigned int stale;
unsigned int ndscn;
};
std::map<PluginType, PluginCount> plugin_count; std::map<PluginType, PluginCount> plugin_count;
std::vector<boost::shared_ptr<PluginScanLogEntry> > psl; std::vector<boost::shared_ptr<PluginScanLogEntry> > psl;

View File

@ -44,7 +44,6 @@ public:
private: private:
void refill (); void refill ();
void on_show ();
void selection_changed (); void selection_changed ();
void blacklist_changed (std::string const&); void blacklist_changed (std::string const&);
void favorite_changed (std::string const&); void favorite_changed (std::string const&);
@ -61,6 +60,22 @@ private:
void plugin_status_changed (ARDOUR::PluginType, std::string, ARDOUR::PluginManager::PluginStatusType); void plugin_status_changed (ARDOUR::PluginType, std::string, ARDOUR::PluginManager::PluginStatusType);
struct PluginCount {
PluginCount ()
: total (0)
, error (0)
, stale (0)
, ndscn (0)
{}
void set (ARDOUR::PluginScanLogEntry const& psle);
unsigned int total;
unsigned int error;
unsigned int stale;
unsigned int ndscn;
};
struct PluginColumns : public Gtk::TreeModel::ColumnRecord { struct PluginColumns : public Gtk::TreeModel::ColumnRecord {
PluginColumns () { PluginColumns () {
add (status); add (status);