Commit afdcaf79 authored by Dominik Charousset's avatar Dominik Charousset

More cppcheck fixes, reimplement `test_match_expr`

parent b47702ee
......@@ -226,7 +226,6 @@ void deserialize_impl(channel& ptrref, deserializer* source) {
}
void serialize_impl(const message& tup, serializer* sink) {
std::string dynamic_name; // used if tup holds an object_array
// ttn can be nullptr even if tuple is not empty (in case of object_array)
std::string tname = tup.empty() ? "@<>" : tup.tuple_type_names();
auto uti_map = detail::singletons::get_uniform_type_info_map();
......@@ -485,8 +484,7 @@ protected:
class default_meta_message : public uniform_type_info {
public:
default_meta_message(const std::string& tname) {
m_name = tname;
default_meta_message(const std::string& tname) : m_name(tname) {
std::vector<std::string> elements;
split(elements, tname, is_any_of("+"));
auto uti_map = detail::singletons::get_uniform_type_info_map();
......@@ -555,11 +553,11 @@ template <class Iterator>
struct builtin_types_helper {
Iterator pos;
builtin_types_helper(Iterator first) : pos(first) {}
inline void operator()() {
void operator()() const {
// end of recursion
}
template <class T, class... Ts>
inline void operator()(T& arg, Ts&... args) {
void operator()(T& arg, Ts&... args) {
*pos++ = &arg;
(*this)(args...);
}
......
......@@ -406,10 +406,9 @@ namespace network {
// altering the pollset while traversing it is not exactly a
// bright idea ...
struct fd_event {
native_socket fd; // our file descriptor
short mask; // the event mask returned by poll()
short fd_mask; // the mask associated with fd
event_handler* ptr; // nullptr in case of a pipe event
native_socket fd; // our file descriptor
short mask; // the event mask returned by poll()
event_handler* ptr; // nullptr in case of a pipe event
};
std::vector<fd_event> poll_res;
while (!m_pollset.empty()) {
......@@ -449,7 +448,7 @@ namespace network {
if (pfd.revents != 0) {
CAF_LOG_DEBUG("event on socket " << pfd.fd
<< ", revents = " << pfd.revents);
poll_res.push_back({pfd.fd, pfd.revents, pfd.events, m_shadow[i]});
poll_res.push_back({pfd.fd, pfd.revents, m_shadow[i]});
pfd.revents = 0;
--presult; // stop as early as possible
}
......
......@@ -21,6 +21,7 @@ add_unit_test(atom)
add_unit_test(metaprogramming)
add_unit_test(intrusive_containers)
add_unit_test(match)
add_unit_test(match_expr)
add_unit_test(message)
add_unit_test(serialization)
add_unit_test(uniform_type)
......
This diff is collapsed.
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