Commit c816aeff authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Rename IOBufEqual to IOBufEqualTo

Summary: [Folly] Rename `IOBufEqual` to `IOBufEqualTo` to correspond with the standard naming of `std::equal_to`.

Reviewed By: Orvid

Differential Revision: D7596716

fbshipit-source-id: 2e87aa4b62a002520bdd53b5b7eaba7d9bd822da
parent ad317726
......@@ -1028,7 +1028,7 @@ size_t IOBufHash::operator()(const IOBuf& buf) const {
return h1;
}
bool IOBufEqual::operator()(const IOBuf& a, const IOBuf& b) const {
bool IOBufEqualTo::operator()(const IOBuf& a, const IOBuf& b) const {
io::Cursor ca(&a);
io::Cursor cb(&b);
for (;;) {
......
......@@ -1424,7 +1424,7 @@ struct IOBufHash {
/**
* Equality predicate for IOBuf objects. Compares data in the entire chain.
*/
struct IOBufEqual {
struct IOBufEqualTo {
bool operator()(const IOBuf& a, const IOBuf& b) const;
bool operator()(const std::unique_ptr<IOBuf>& a,
const std::unique_ptr<IOBuf>& b) const {
......
......@@ -48,7 +48,7 @@ class TestWriteChainAsyncTransportWrapper :
};
MATCHER_P(BufMatches, expected, "") {
folly::IOBufEqual eq;
folly::IOBufEqualTo eq;
return eq(*arg, *expected);
}
......
......@@ -445,7 +445,7 @@ TEST(IOBuf, cloneAndInsert) {
}
TEST(IOBuf, cloneWithEmptyBufAtStart) {
folly::IOBufEqual eq;
folly::IOBufEqualTo eq;
auto empty = IOBuf::create(0);
auto hel = IOBuf::create(3);
append(hel, "hel");
......
......@@ -1044,7 +1044,7 @@ std::unique_ptr<IOBuf> fromStr(StringPiece sp) {
} // namespace
TEST(IOBuf, HashAndEqual) {
folly::IOBufEqual eq;
folly::IOBufEqualTo eq;
folly::IOBufHash hash;
EXPECT_TRUE(eq(nullptr, nullptr));
......
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