Commit 2b917f9f authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[5585] Minor fixes as a result of the review.

- Adjusted accessors to fit the coding style
- Typos corrected
- Passing objects by reference to avoid cppcheck complaints
parent 3c2897f7
......@@ -186,15 +186,21 @@ public:
virtual bool getNextRow(LeaseStatsRow& row);
/// @brief Returns the value of first subnet ID specified (or zero)
SubnetID getFirstSubnetID() const { return first_subnet_id_; };
SubnetID getFirstSubnetID() const {
return (first_subnet_id_);
};
/// @brief Returns the value of last subnet ID specified (or zero)
SubnetID getLastSubnetID() const { return last_subnet_id_; };
SubnetID getLastSubnetID() const {
return (last_subnet_id_);
};
/// @brief Returns the selection criteria mode
/// The value returned is based upon the constructor variant used
/// and it indicates which query variant will be executed.
SelectMode getSelectMode() const { return select_mode_; };
SelectMode getSelectMode() const {
return (select_mode_);
};
private:
/// @brief First (or only) subnet_id in the selection criteria
......
......@@ -688,7 +688,7 @@ public:
/// @brief Creates and runs the IPv6 lease stats query for a single subnet
///
/// It creates an instance of a MemfileLeaseStatsQuery4 for a subnet range
/// It creates an instance of a MemfileLeaseStatsQuery6 for a subnet range
/// query and then invokes its start method in which the query constructs its
/// statistical data result set. The query object is then returned.
///
......
......@@ -2858,8 +2858,8 @@ LeaseMgrDbLostCallbackTest::testDbLostCallback() {
}
void
GenericLeaseMgrTest::checkQueryAgainstRowSet(LeaseStatsQueryPtr query,
RowSet& expected_rows) {
GenericLeaseMgrTest::checkQueryAgainstRowSet(const LeaseStatsQueryPtr& query,
const RowSet& expected_rows) {
ASSERT_TRUE(query) << "query is null";
int rows_matched = 0;
......@@ -2962,7 +2962,7 @@ GenericLeaseMgrTest::testLeaseStatsQuery4() {
// Test a single subnet
{
SCOPED_TRACE("SINGLE SUBNET");
// Add expected row for Subnet 2
// Add expected rows for Subnet 2
expected_rows.insert(LeaseStatsRow(2, Lease::STATE_DEFAULT, 0));
expected_rows.insert(LeaseStatsRow(2, Lease::STATE_DECLINED, 1));
// Start the query
......
......@@ -424,7 +424,7 @@ public:
///
/// @param qry - a started LeaseStatsQuery
/// @param row_set - set of rows expected to be found in the query rows
void checkQueryAgainstRowSet(LeaseStatsQueryPtr qry, RowSet& row_set);
void checkQueryAgainstRowSet(const LeaseStatsQueryPtr& qry, const RowSet& row_set);
/// @brief String forms of IPv4 addresses
std::vector<std::string> straddress4_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment