2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[1688] editorial fixes/cleanups: folded long line, naming convention, constify.

also removed "addRRset" utility from rbnode_rrset_unittest, which seems to
be a leftover from an intermediate version (and isn't used anyway)
This commit is contained in:
JINMEI Tatuya
2012-03-21 13:58:50 -07:00
parent b09579f0af
commit c0f704fc09
4 changed files with 5 additions and 16 deletions

View File

@@ -59,9 +59,9 @@ Query::RRsetInserter::addRRset(isc::dns::Message& message,
const ConstRRsetPtr& rrset, const bool dnssec)
{
/// Is this RRset already in the list of RRsets added to the message?
std::vector<const AbstractRRset*>::iterator i =
const std::vector<const AbstractRRset*>::const_iterator i =
std::find_if(added_.begin(), added_.end(),
std::bind1st(Query::RRsetInserter::isSameKind(),
std::bind1st(Query::RRsetInserter::IsSameKind(),
rrset.get()));
if (i == added_.end()) {
// No - add it to both the message and the list of RRsets processed.

View File

@@ -265,7 +265,7 @@ private:
class RRsetInserter {
public:
// \brief RRset comparison functor.
struct isSameKind : public std::binary_function<
struct IsSameKind : public std::binary_function<
const isc::dns::AbstractRRset*,
const isc::dns::AbstractRRset*,
bool> {

View File

@@ -2430,7 +2430,8 @@ loadRRsetVector() {
<< cname_nxdom_txt // 7(1)
<< cname_out_txt; // 8(1)
rrset_vector.clear();
masterLoad(ss, Name("example.com."), RRClass::IN(), loadRRsetVectorCallback);
masterLoad(ss, Name("example.com."), RRClass::IN(),
loadRRsetVectorCallback);
}
TEST_F(QueryTest, DuplicateNameRemoval) {

View File

@@ -157,18 +157,6 @@ TEST_F(RBNodeRRsetTest, isSameKind) {
EXPECT_FALSE(rrset_p.isSameKind(rrset_z));
}
// Utility function to create an add an RRset to a vector of RRsets for the
// "less" test. It's only purpose is to allow the RRset creation to be
// written with arguments in an order that reflects the RRset ordering.
void
addRRset(std::vector<ConstRRsetPtr>& vec, const RRType& rrtype,
const RRClass& rrclass, const char* rrname)
{
vec.push_back(ConstRRsetPtr(new RRset(Name(rrname), rrclass, rrtype,
RRTTL(3600))));
}
// Note: although the next two tests are essentially the same and used common
// test code, they use different test data: the MessageRenderer produces
// compressed wire data whereas the OutputBuffer does not.