X-Git-Url: http://git.liburcu.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fctf2-trace-class-visitor.cpp;fp=src%2Fbin%2Flttng-sessiond%2Fctf2-trace-class-visitor.cpp;h=71a2e48d2190c29e0401c4876dda9322e815a456;hp=8da98591d6e0c731eea61d67199a8c859cef6b72;hb=20c4b46aee1a984bc558b483826c1078f24d35e9;hpb=d83ba9baef029eedf530d272d95487e9c59d4226 diff --git a/src/bin/lttng-sessiond/ctf2-trace-class-visitor.cpp b/src/bin/lttng-sessiond/ctf2-trace-class-visitor.cpp index 8da98591d..71a2e48d2 100644 --- a/src/bin/lttng-sessiond/ctf2-trace-class-visitor.cpp +++ b/src/bin/lttng-sessiond/ctf2-trace-class-visitor.cpp @@ -165,7 +165,7 @@ private: _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_) { @@ -201,7 +201,7 @@ private: _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::value) { LTTNG_THROW_ERROR( @@ -278,7 +278,7 @@ private: _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_) {