From 861f046f2d1c367a5c62abaa7d86f53553106497 Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Wed, 8 Nov 2017 21:03:42 +0000 Subject: [PATCH] Refine syntax: expose overloaded inherited functions --- cfgmgr/intfmgr.h | 1 + cfgmgr/intfmgrd.cpp | 2 +- cfgmgr/vlanmgr.cpp | 3 +-- cfgmgr/vlanmgr.h | 1 + cfgmgr/vlanmgrd.cpp | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cfgmgr/intfmgr.h b/cfgmgr/intfmgr.h index a2c89d0cc2..b7460cb3ac 100644 --- a/cfgmgr/intfmgr.h +++ b/cfgmgr/intfmgr.h @@ -14,6 +14,7 @@ class IntfMgr : public Orch { public: IntfMgr(DBConnector *cfgDb, DBConnector *appDb, DBConnector *stateDb, const vector &tableNames); + using Orch::doTask; private: ProducerStateTable m_appIntfTableProducer; diff --git a/cfgmgr/intfmgrd.cpp b/cfgmgr/intfmgrd.cpp index fe72d3c5b7..4c734d34f5 100644 --- a/cfgmgr/intfmgrd.cpp +++ b/cfgmgr/intfmgrd.cpp @@ -75,7 +75,7 @@ int main(int argc, char **argv) } if (ret == Select::TIMEOUT) { - ((Orch *)&intfmgr)->doTask(); + intfmgr.doTask(); continue; } diff --git a/cfgmgr/vlanmgr.cpp b/cfgmgr/vlanmgr.cpp index ff968a2e35..90d87005f1 100644 --- a/cfgmgr/vlanmgr.cpp +++ b/cfgmgr/vlanmgr.cpp @@ -167,12 +167,11 @@ bool VlanMgr::removeHostVlanMember(int vlan_id, const string &port_alias) bool VlanMgr::isVlanMacOk() { - return !(!gMacAddress); + return !!gMacAddress; } void VlanMgr::doVlanTask(Consumer &consumer) { - if (!isVlanMacOk()) { SWSS_LOG_DEBUG("VLAN mac not ready, delaying VLAN task"); diff --git a/cfgmgr/vlanmgr.h b/cfgmgr/vlanmgr.h index eb486bb99b..4a04da22a5 100644 --- a/cfgmgr/vlanmgr.h +++ b/cfgmgr/vlanmgr.h @@ -15,6 +15,7 @@ class VlanMgr : public Orch { public: VlanMgr(DBConnector *cfgDb, DBConnector *appDb, DBConnector *stateDb, const vector &tableNames); + using Orch::doTask; private: ProducerStateTable m_appVlanTableProducer, m_appVlanMemberTableProducer; diff --git a/cfgmgr/vlanmgrd.cpp b/cfgmgr/vlanmgrd.cpp index ced51a1585..2b5030d042 100644 --- a/cfgmgr/vlanmgrd.cpp +++ b/cfgmgr/vlanmgrd.cpp @@ -90,7 +90,7 @@ int main(int argc, char **argv) } if (ret == Select::TIMEOUT) { - ((Orch *)&vlanmgr)->doTask(); + vlanmgr.doTask(); continue; }