projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Docs: Fix broken reference in lttng-add-trigger
[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..8da98591d6e0c731eea61d67199a8c859cef6b72 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,15
@@
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; /* NOLINT clang-tidy 14 identifies this as a move
+ constructor. */
- 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
+135,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; /* NOLINT clang-tidy 14 identifies this as a move constructor. */
/* Only call once. */
json::json move_fragment()
/* Only call once. */
json::json move_fragment()
@@
-146,7
+144,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
+153,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
+176,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;
@@
-207,8
+205,8
@@
private:
if (std::is_signed<typename EnumerationType::mapping::range_t::
range_integer_t>::value) {
LTTNG_THROW_ERROR(
if (std::is_signed<typename EnumerationType::mapping::range_t::
range_integer_t>::value) {
LTTNG_THROW_ERROR(
-
fmt
::format("Failed to serialize {}: unexpected role",
- _fragment["type"]));
+
lttng
::format("Failed to serialize {}: unexpected role",
+
_fragment["type"]));
}
auto role_array = json::json::array();
}
auto role_array = json::json::array();
@@
-221,7
+219,7
@@
private:
}
if (type.mappings_->size() < 1) {
}
if (type.mappings_->size() < 1) {
- LTTNG_THROW_ERROR(
fmt
::format(
+ LTTNG_THROW_ERROR(
lttng
::format(
"Failed to serialize {}: enumeration must have at least one mapping",
_fragment["type"]));
}
"Failed to serialize {}: enumeration must have at least one mapping",
_fragment["type"]));
}
@@
-235,17
+233,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
+258,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
+273,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
+289,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
+342,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
+372,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.025839 seconds
and
4
git commands to generate.