Skip to content

Commit 165e2dc

Browse files
authored
Refine syntax: expose overloaded inherited functions (sonic-net#376)
1 parent 64d5a5a commit 165e2dc

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

cfgmgr/intfmgr.h

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class IntfMgr : public Orch
1414
{
1515
public:
1616
IntfMgr(DBConnector *cfgDb, DBConnector *appDb, DBConnector *stateDb, const vector<string> &tableNames);
17+
using Orch::doTask;
1718

1819
private:
1920
ProducerStateTable m_appIntfTableProducer;

cfgmgr/intfmgrd.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ int main(int argc, char **argv)
7575
}
7676
if (ret == Select::TIMEOUT)
7777
{
78-
((Orch *)&intfmgr)->doTask();
78+
intfmgr.doTask();
7979
continue;
8080
}
8181

cfgmgr/vlanmgr.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,11 @@ bool VlanMgr::removeHostVlanMember(int vlan_id, const string &port_alias)
167167

168168
bool VlanMgr::isVlanMacOk()
169169
{
170-
return !(!gMacAddress);
170+
return !!gMacAddress;
171171
}
172172

173173
void VlanMgr::doVlanTask(Consumer &consumer)
174174
{
175-
176175
if (!isVlanMacOk())
177176
{
178177
SWSS_LOG_DEBUG("VLAN mac not ready, delaying VLAN task");

cfgmgr/vlanmgr.h

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class VlanMgr : public Orch
1515
{
1616
public:
1717
VlanMgr(DBConnector *cfgDb, DBConnector *appDb, DBConnector *stateDb, const vector<string> &tableNames);
18+
using Orch::doTask;
1819

1920
private:
2021
ProducerStateTable m_appVlanTableProducer, m_appVlanMemberTableProducer;

cfgmgr/vlanmgrd.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
9090
}
9191
if (ret == Select::TIMEOUT)
9292
{
93-
((Orch *)&vlanmgr)->doTask();
93+
vlanmgr.doTask();
9494
continue;
9595
}
9696

0 commit comments

Comments
 (0)