Commit a1cb4a0b authored by Dominik Charousset's avatar Dominik Charousset

Fix some cppcheck style nitpicks

parent 7a89b0ff
...@@ -55,7 +55,10 @@ struct log_event { ...@@ -55,7 +55,10 @@ struct log_event {
log_event* next; log_event* next;
log_event* prev; log_event* prev;
std::string msg; std::string msg;
log_event(std::string logmsg = "") : msg(std::move(logmsg)) { log_event(std::string logmsg = "")
: next(nullptr),
prev(nullptr),
msg(std::move(logmsg)) {
// nop // nop
} }
}; };
...@@ -68,7 +71,7 @@ struct log_event { ...@@ -68,7 +71,7 @@ struct log_event {
class logging_impl : public logging { class logging_impl : public logging {
public: public:
void initialize() { void initialize() override {
const char* log_level_table[] = {"ERROR", "WARN", "INFO", "DEBUG", "TRACE"}; const char* log_level_table[] = {"ERROR", "WARN", "INFO", "DEBUG", "TRACE"};
m_thread = std::thread([this] { (*this)(); }); m_thread = std::thread([this] { (*this)(); });
std::string msg = "ENTRY log level = "; std::string msg = "ENTRY log level = ";
...@@ -76,7 +79,7 @@ class logging_impl : public logging { ...@@ -76,7 +79,7 @@ class logging_impl : public logging {
log("TRACE", "logging", "run", __FILE__, __LINE__, msg); log("TRACE", "logging", "run", __FILE__, __LINE__, msg);
} }
void stop() { void stop() override {
log("TRACE", "logging", "run", __FILE__, __LINE__, "EXIT"); log("TRACE", "logging", "run", __FILE__, __LINE__, "EXIT");
// an empty string means: shut down // an empty string means: shut down
m_queue.synchronized_enqueue(m_queue_mtx, m_queue_cv, new log_event{""}); m_queue.synchronized_enqueue(m_queue_mtx, m_queue_cv, new log_event{""});
......
...@@ -196,16 +196,6 @@ class string_serializer : public serializer, public dummy_backend { ...@@ -196,16 +196,6 @@ class string_serializer : public serializer, public dummy_backend {
m_after_value = true; m_after_value = true;
} }
void write_tuple(size_t size, const primitive_variant* values) {
clear();
out << "{";
const primitive_variant* end = values + size;
for (; values != end; ++values) {
write_value(*values);
}
out << (m_after_value ? " }" : "}");
}
void write_raw(size_t num_bytes, const void* buf) { void write_raw(size_t num_bytes, const void* buf) {
clear(); clear();
auto first = reinterpret_cast<const unsigned char*>(buf); auto first = reinterpret_cast<const unsigned char*>(buf);
......
...@@ -69,7 +69,7 @@ struct pseudo_actor { ...@@ -69,7 +69,7 @@ struct pseudo_actor {
return mbox; return mbox;
} }
policy::invoke_message_result invoke_message(uptr& ptr, int i) { static policy::invoke_message_result invoke_message(uptr& ptr, int i) {
if (ptr->value == 1) { if (ptr->value == 1) {
ptr.reset(); ptr.reset();
return policy::im_dropped; return policy::im_dropped;
......
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