Skip to content

Commit

Permalink
Apply clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Martchus committed Jun 14, 2024
1 parent 71b613b commit d24ab6a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/rel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct Record {
template <class Archive> void serialize(Archive &ar, const unsigned int version)
{
CPP_UTILITIES_UNUSED(version)
ar &id &domain_id &name &type &ttl &content &enabled &auth;
ar & id & domain_id & name & type & ttl & content & enabled & auth;
}

unsigned int id;
Expand Down
16 changes: 8 additions & 8 deletions examples/typed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ struct DomainInfo {
template <class Archive> void serialize(Archive &ar, DomainInfo &g, const unsigned int version)
{
CPP_UTILITIES_UNUSED(version)
ar &g.qname &g.master;
ar & g.qname & g.master;
}

template <class Archive> void serialize(Archive &ar, DNSResourceRecord &g, const unsigned int version)
{
CPP_UTILITIES_UNUSED(version)
ar &g.qtype;
ar &g.qname;
ar &g.content;
ar &g.ttl;
ar &g.domain_id;
ar &g.ordername;
ar &g.auth;
ar & g.qtype;
ar & g.qname;
ar & g.content;
ar & g.ttl;
ar & g.domain_id;
ar & g.ordername;
ar & g.auth;
}

struct compound {
Expand Down
8 changes: 3 additions & 5 deletions tests/typed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct Member {
template <class Archive> void serialize(Archive &ar, Member &g, const unsigned int version)
{
CPP_UTILITIES_UNUSED(version)
ar &g.firstName &g.lastName &g.enrolled;
ar & g.firstName & g.lastName & g.enrolled;
}

TEST_CASE("Basic typed tests", "[basictyped]")
Expand Down Expand Up @@ -97,17 +97,15 @@ TEST_CASE("Basic typed tests", "[basictyped]")
REQUIRE(out.lastName == "testperson");

// modify existing row via modify function
txn.modify(3, [] (Member &member) { member.firstName = "yetanother"; });
txn.modify(3, [](Member &member) { member.firstName = "yetanother"; });
REQUIRE(!txn.get<0>("another", out));
REQUIRE(txn.get<0>("yetanother", out));
REQUIRE(out.firstName == "yetanother");
REQUIRE(out.lastName == "testperson");
REQUIRE(out.enrolled == m.enrolled);

// rebuild the database
txn.rebuild([] (IDType, Member *member) {
return member->firstName != "bertus";
});
txn.rebuild([](IDType, Member *member) { return member->firstName != "bertus"; });
REQUIRE(txn.size() == 2);
REQUIRE(txn.size<0>() == txn.size());
REQUIRE(!txn.get<0>("bertus", out));
Expand Down

0 comments on commit d24ab6a

Please sign in to comment.