namespace ctf2 {
class trace_environment_visitor : public lst::trace_class_environment_visitor {
public:
- trace_environment_visitor() = default;
+ trace_environment_visitor() = default; /* NOLINT clang-tidy 14 identifies this as a move
+ constructor. */
void visit(const lst::environment_field<int64_t>& field) override
{
class field_visitor : public lttng::sessiond::trace::field_visitor,
public lttng::sessiond::trace::type_visitor {
public:
- field_visitor() = default;
+ field_visitor() = default; /* NOLINT clang-tidy 14 identifies this as a move constructor. */
/* Only call once. */
json::json move_fragment()
_fragment["alignment"] = type.alignment;
_fragment["preferred-display-base"] = (unsigned int) type.base_;
- if (type.roles_.size() > 0) {
+ if (!type.roles_.empty()) {
json::json role_array = json::json::array();
for (const auto role : type.roles_) {
_fragment["alignment"] = type.alignment;
_fragment["preferred-display-base"] = (unsigned int) type.base_;
- if (type.roles_.size() > 0) {
+ if (!type.roles_.empty()) {
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();
}
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"]));
}
_fragment["type"] = "static-length-blob";
_fragment["length"] = type.length_bytes;
- if (type.roles_.size() > 0) {
+ if (!type.roles_.empty()) {
auto role_array = json::json::array();
for (const auto role : type.roles_) {