Skip to content

Commit

Permalink
Remove unnecessary sai header include from OrchBase and use const for…
Browse files Browse the repository at this point in the history
… reference

Signed-off-by: Jipan Yang <[email protected]>
  • Loading branch information
jipanyang committed Oct 25, 2017
1 parent f567979 commit 34b36f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions orchagent/orchbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ OrchBase::OrchBase(DBConnector *db, string tableName)
addConsumer(db, tableName);
}

OrchBase::OrchBase(DBConnector *db, vector<string> &tableNames)
OrchBase::OrchBase(DBConnector *db, const vector<string> &tableNames)
{
for(auto it : tableNames)
{
Expand Down Expand Up @@ -199,4 +199,4 @@ void OrchBase::addConsumer(DBConnector *db, string tableName, int batchSize)
Consumer consumer(new ConsumerStateTable(db, tableName, batchSize));
m_consumerMap.insert(ConsumerMapPair(tableName, consumer));
}
}
}
9 changes: 2 additions & 7 deletions orchagent/orchbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
#include <map>
#include <memory>

extern "C" {
#include "sai.h"
#include "saistatus.h"
}

#include "dbconnector.h"
#include "table.h"
#include "consumertable.h"
Expand Down Expand Up @@ -38,7 +33,7 @@ class OrchBase
{
public:
OrchBase(DBConnector *db, string tableName);
OrchBase(DBConnector *db, vector<string> &tableNames);
OrchBase(DBConnector *db, const vector<string> &tableNames);
OrchBase(const vector<TableConnector>& tables);
virtual ~OrchBase();

Expand All @@ -60,4 +55,4 @@ class OrchBase
bool syncDB(string tableName, Table &tableConsumer);
};

#endif /* SWSS_ORCH_BASE_H */
#endif /* SWSS_ORCH_BASE_H */

0 comments on commit 34b36f6

Please sign in to comment.