Clear the error faster

This commit is contained in:
Vinnie Falco
2017-07-20 08:15:27 -07:00
parent fc09a4cad1
commit 4d393f4c2a
28 changed files with 117 additions and 116 deletions
+6 -6
View File
@@ -57,13 +57,13 @@ public:
void
init(error_code& ec)
{
ec = {};
ec.assign(0, ec.category());
}
boost::optional<std::pair<const_buffers_type, bool>>
get(error_code& ec)
{
ec = {};
ec.assign(0, ec.category());
return {{const_buffers_type{
body_.data(), body_.size()}, false}};
}
@@ -71,7 +71,7 @@ public:
void
finish(error_code& ec)
{
ec = {};
ec.assign(0, ec.category());
}
};
};
@@ -112,13 +112,13 @@ public:
void
init(error_code& ec)
{
ec = {};
ec.assign(0, ec.category());
}
boost::optional<std::pair<const_buffers_type, bool>>
get(error_code& ec)
{
ec = {};
ec.assign(0, ec.category());
body_.read = true;
return get(
std::integral_constant<bool, isSplit>{},
@@ -128,7 +128,7 @@ public:
void
finish(error_code& ec)
{
ec = {};
ec.assign(0, ec.category());
}
private: