projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clang-tidy: add Chrome-inspired checks
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
ctf2-trace-class-visitor.cpp
diff --git
a/src/bin/lttng-sessiond/ctf2-trace-class-visitor.cpp
b/src/bin/lttng-sessiond/ctf2-trace-class-visitor.cpp
index 2f583cdf89525d382a5d5a9d9b13efc33af4b0b8..6b6c6265b5c8e661b84fe8cc0e4ad961e113c42e 100644
(file)
--- a/
src/bin/lttng-sessiond/ctf2-trace-class-visitor.cpp
+++ b/
src/bin/lttng-sessiond/ctf2-trace-class-visitor.cpp
@@
-15,6
+15,7
@@
#include <vendor/nlohmann/json.hpp>
#include <algorithm>
#include <vendor/nlohmann/json.hpp>
#include <algorithm>
+#include <utility>
namespace lsc = lttng::sessiond::ctf2;
namespace lst = lttng::sessiond::trace;
namespace lsc = lttng::sessiond::ctf2;
namespace lst = lttng::sessiond::trace;
@@
-102,16
+103,14
@@
const char *get_role_name(lst::static_length_blob_type::role role)
namespace ctf2 {
class trace_environment_visitor : public lst::trace_class_environment_visitor {
public:
namespace ctf2 {
class trace_environment_visitor : public lst::trace_class_environment_visitor {
public:
- trace_environment_visitor()
- {
- }
+ trace_environment_visitor() = default;
- v
irtual v
oid visit(const lst::environment_field<int64_t>& field) override
+ void visit(const lst::environment_field<int64_t>& field) override
{
_visit(field);
}
{
_visit(field);
}
- v
irtual v
oid visit(const lst::environment_field<const char *>& field) override
+ void visit(const lst::environment_field<const char *>& field) override
{
_visit(field);
}
{
_visit(field);
}
@@
-135,9
+134,7
@@
private:
class field_visitor : public lttng::sessiond::trace::field_visitor,
public lttng::sessiond::trace::type_visitor {
public:
class field_visitor : public lttng::sessiond::trace::field_visitor,
public lttng::sessiond::trace::type_visitor {
public:
- field_visitor()
- {
- }
+ field_visitor() = default;
/* Only call once. */
json::json move_fragment()
/* Only call once. */
json::json move_fragment()
@@
-146,7
+143,7
@@
public:
}
private:
}
private:
- v
irtual void visit(const lst::field& field) override
final
+ v
oid visit(const lst::field& field)
final
{
field_visitor field_type_visitor;
field.get_type().accept(field_type_visitor);
{
field_visitor field_type_visitor;
field.get_type().accept(field_type_visitor);
@@
-155,7
+152,7
@@
private:
_fragment["field-class"] = field_type_visitor.move_fragment();
}
_fragment["field-class"] = field_type_visitor.move_fragment();
}
- v
irtual void visit(const lst::integer_type& type) override
final
+ v
oid visit(const lst::integer_type& type)
final
{
_fragment["type"] = type.signedness_ == lst::integer_type::signedness::SIGNED ?
"fixed-length-signed-integer" :
{
_fragment["type"] = type.signedness_ == lst::integer_type::signedness::SIGNED ?
"fixed-length-signed-integer" :
@@
-178,7
+175,7
@@
private:
}
}
}
}
- v
irtual void visit(const lst::floating_point_type& type) override
final
+ v
oid visit(const lst::floating_point_type& type)
final
{
_fragment["type"] = "fixed-length-floating-point-number";
_fragment["length"] = type.exponent_digits + type.mantissa_digits;
{
_fragment["type"] = "fixed-length-floating-point-number";
_fragment["length"] = type.exponent_digits + type.mantissa_digits;
@@
-235,17
+232,17
@@
private:
_fragment["mappings"] = std::move(mappings_value);
}
_fragment["mappings"] = std::move(mappings_value);
}
- v
irtual void visit(const lst::signed_enumeration_type& type) override
final
+ v
oid visit(const lst::signed_enumeration_type& type)
final
{
visit_enumeration(type);
}
{
visit_enumeration(type);
}
- v
irtual void visit(const lst::unsigned_enumeration_type& type) override
final
+ v
oid visit(const lst::unsigned_enumeration_type& type)
final
{
visit_enumeration(type);
}
{
visit_enumeration(type);
}
- v
irtual void visit(const lst::static_length_array_type& type) override
final
+ v
oid visit(const lst::static_length_array_type& type)
final
{
_fragment["type"] = "static-length-array";
{
_fragment["type"] = "static-length-array";
@@
-260,7
+257,7
@@
private:
_fragment["length"] = type.length;
}
_fragment["length"] = type.length;
}
- v
irtual void visit(const lst::dynamic_length_array_type& type) override
final
+ v
oid visit(const lst::dynamic_length_array_type& type)
final
{
_fragment["type"] = "dynamic-length-array";
{
_fragment["type"] = "dynamic-length-array";
@@
-275,7
+272,7
@@
private:
_fragment["length-field-location"] = to_json(type.length_field_location);
}
_fragment["length-field-location"] = to_json(type.length_field_location);
}
- v
irtual void visit(const lst::static_length_blob_type& type) override
final
+ v
oid visit(const lst::static_length_blob_type& type)
final
{
_fragment["type"] = "static-length-blob";
_fragment["length"] = type.length_bytes;
{
_fragment["type"] = "static-length-blob";
_fragment["length"] = type.length_bytes;
@@
-291,19
+288,18
@@
private:
}
}
}
}
- v
irtual void visit(const lst::dynamic_length_blob_type& type) override
final
+ v
oid visit(const lst::dynamic_length_blob_type& type)
final
{
_fragment["type"] = "dynamic-length-blob";
_fragment["length-field-location"] = to_json(type.length_field_location);
}
{
_fragment["type"] = "dynamic-length-blob";
_fragment["length-field-location"] = to_json(type.length_field_location);
}
- virtual void visit(const lst::null_terminated_string_type& type
- __attribute__((unused))) override final
+ void visit(const lst::null_terminated_string_type& type __attribute__((unused))) final
{
_fragment["type"] = "null-terminated-string";
}
{
_fragment["type"] = "null-terminated-string";
}
- v
irtual void visit(const lst::structure_type& type) override
final
+ v
oid visit(const lst::structure_type& type)
final
{
_fragment["type"] = "structure";
{
_fragment["type"] = "structure";
@@
-345,23
+341,23
@@
private:
_fragment["options"] = std::move(options_value);
}
_fragment["options"] = std::move(options_value);
}
- v
irtual void visit(const lst::variant_type<int64_t>& type) override
final
+ v
oid visit(const lst::variant_type<int64_t>& type)
final
{
visit_variant(type);
}
{
visit_variant(type);
}
- v
irtual void visit(const lst::variant_type<uint64_t>& type) override
final
+ v
oid visit(const lst::variant_type<uint64_t>& type)
final
{
visit_variant(type);
}
{
visit_variant(type);
}
- v
irtual void visit(const lst::static_length_string_type& type) override
final
+ v
oid visit(const lst::static_length_string_type& type)
final
{
_fragment["type"] = "static-length-string";
_fragment["length"] = type.length;
}
{
_fragment["type"] = "static-length-string";
_fragment["length"] = type.length;
}
- v
irtual void visit(const lst::dynamic_length_string_type& type) override
final
+ v
oid visit(const lst::dynamic_length_string_type& type)
final
{
_fragment["type"] = "dynamic-length-string";
_fragment["length-field-location"] = to_json(type.length_field_location);
{
_fragment["type"] = "dynamic-length-string";
_fragment["length-field-location"] = to_json(type.length_field_location);
@@
-375,7
+371,7
@@
private:
lsc::trace_class_visitor::trace_class_visitor(
lsc::append_metadata_fragment_function append_metadata_fragment) :
lsc::trace_class_visitor::trace_class_visitor(
lsc::append_metadata_fragment_function append_metadata_fragment) :
- _append_metadata_fragment(
append_metadata_fragment
)
+ _append_metadata_fragment(
std::move(append_metadata_fragment)
)
{
}
{
}
This page took
0.026964 seconds
and
4
git commands to generate.