Commit c6e54c4f authored by Mark Santaniello's avatar Mark Santaniello Committed by Facebook GitHub Bot

Back out "Avoid copying ByteRange in OpenSSLHash hash_update()"

Summary:
Original commit changeset: 7d3b54d26bc3

Original Phabricator Diff: D33304127 (https://github.com/facebook/folly/commit/21329c4cb847b7cf9ce0610449df0272df945d70)

Reviewed By: yfeldblum

Differential Revision: D33733281

fbshipit-source-id: 683de43fc0d32aa40d3a6a6ef49f8b2d3760f48f
parent 594b7e77
......@@ -68,7 +68,7 @@ class OpenSSLHash {
md_ = md;
}
void hash_update(const ByteRange& data) {
void hash_update(ByteRange data) {
if (nullptr == ctx_) {
throw_exception<std::runtime_error>(
"hash_update() called without hash_init()");
......@@ -78,7 +78,7 @@ class OpenSSLHash {
}
void hash_update(const IOBuf& data) {
for (const auto& r : data) {
for (auto r : data) {
hash_update(r);
}
}
......@@ -196,7 +196,7 @@ class OpenSSLHash {
md_ = md;
}
void hash_update(const ByteRange& data) {
void hash_update(ByteRange data) {
if (ctx_ == nullptr) {
throw_exception<std::runtime_error>(
"hash_update() called without hash_init()");
......@@ -205,7 +205,7 @@ class OpenSSLHash {
}
void hash_update(const IOBuf& data) {
for (const auto& r : data) {
for (auto r : data) {
hash_update(r);
}
}
......
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