Commit a61eaed8 authored by Jakob Otto's avatar Jakob Otto

Fix Formatting of Files to match code style

parent 2010f268
......@@ -18,8 +18,8 @@
#pragma once
#include <string>
#include <cstddef>
#include <string>
#include <utility>
#include "caf/config.hpp"
......@@ -27,16 +27,12 @@
namespace caf {
namespace net {
enum class receive_policy_flag : unsigned {
at_least,
at_most,
exactly
};
enum class receive_policy_flag : unsigned { at_least, at_most, exactly };
inline std::string to_string(receive_policy_flag x) {
return x == receive_policy_flag::at_least
? "at_least"
: (x == receive_policy_flag::at_most ? "at_most" : "exactly");
? "at_least"
: (x == receive_policy_flag::at_most ? "at_most" : "exactly");
}
class receive_policy {
......@@ -63,4 +59,3 @@ public:
} // namespace net
} // namespace caf
......@@ -97,7 +97,8 @@ public:
// try to write leftover data!
write_some(parent);
// get new data from parent
for (auto msg = parent.next_message(); msg != nullptr; msg = parent.next_message()) {
for (auto msg = parent.next_message(); msg != nullptr;
msg = parent.next_message()) {
parent.application().prepare(std::move(msg), *this);
}
// write prepared data
......@@ -118,11 +119,10 @@ public:
handle_error(parent, get<caf::sec>(sres));
return false;
}
CAF_LOG_DEBUG(CAF_ARG(len) << CAF_ARG(handle_.id)
<< CAF_ARG(sres));
CAF_LOG_DEBUG(CAF_ARG(len) << CAF_ARG(handle_.id) << CAF_ARG(sres));
auto result = (get<size_t>(sres) > 0)
? static_cast<size_t>(get<size_t>(sres))
: 0;
? static_cast<size_t>(get<size_t>(sres))
: 0;
// update state
written_ += result;
......
......@@ -62,6 +62,5 @@ std::vector<char>& scribe::wr_buf() {
return write_buf_;
}
} // namespace policy
} // namespace caf
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