clang-tidy: apply suggested fixes
[lttng-tools.git] / tests / utils / bt2_plugins / field_stats / field_stats.cpp
index dc8894fd8a0b2ac594407d7c64f7480b086f6bc3..e3be5558ff9b5a148e27753b2414b9dd6c29985b 100644 (file)
 #include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
+#include <utility>
 
 class bad_alloc_with_msg : public std::bad_alloc {
 public:
-       explicit bad_alloc_with_msg(const std::string& msg) : _msg(msg)
+       explicit bad_alloc_with_msg(std::string msg) : _msg(std::move(msg))
        {
        }
 
-       virtual const char *what() const noexcept override
+       const char *what() const noexcept override
        {
                return _msg.c_str();
        }
@@ -45,9 +46,7 @@ public:
                }
        }
 
-       ~field_stats()
-       {
-       }
+       ~field_stats() = default;
 
        lttng::bt2::message_iterator_ref upstream_iterator;
        lttng::bt2::event_class_const_ref event_class;
This page took 0.02382 seconds and 4 git commands to generate.