Clean-up: replace uses of `int enabled` with boolean flags
[lttng-tools.git] / src / bin / lttng-sessiond / consumer.hpp
index 15e2a2fc7c109cc59e0fcc460e3dea085a5dd5a1..6875360e6089d06b870bae7d7a82f27607257e97 100644 (file)
@@ -27,8 +27,8 @@ struct ltt_session;
  * C++.
  */
 static_assert(__cplusplus == 201103L, "");
-template <typename T>
-constexpr T max_constexpr(T l, T r)
+template <typename NumericalType>
+constexpr NumericalType max_constexpr(NumericalType l, NumericalType r)
 {
        return l > r ? l : r;
 }
@@ -75,7 +75,7 @@ struct consumer_socket {
 };
 
 struct consumer_data {
-       consumer_data (lttng_consumer_type type_)
+       explicit consumer_data (lttng_consumer_type type_)
                : type(type_)
        {}
 
@@ -147,7 +147,7 @@ struct consumer_output {
        struct urcu_ref ref;    /* Refcount */
 
        /* If the consumer is enabled meaning that should be used */
-       unsigned int enabled;
+       bool enabled;
        enum consumer_dst_type type;
 
        /*
@@ -261,7 +261,7 @@ void consumer_init_ask_channel_comm_msg(struct lttcomm_consumer_msg *msg,
                const char *name,
                uint64_t relayd_id,
                uint64_t key,
-               unsigned char *uuid,
+               const lttng_uuid& uuid,
                uint32_t chan_id,
                uint64_t tracefile_size,
                uint64_t tracefile_count,
@@ -321,7 +321,7 @@ enum lttng_error_code consumer_snapshot_channel(struct consumer_socket *socket,
 int consumer_rotate_channel(struct consumer_socket *socket, uint64_t key,
                struct consumer_output *output, bool is_metadata_channel);
 int consumer_init(struct consumer_socket *socket,
-               const lttng_uuid sessiond_uuid);
+               const lttng_uuid& sessiond_uuid);
 
 int consumer_create_trace_chunk(struct consumer_socket *socket,
                uint64_t relayd_id, uint64_t session_id,
This page took 0.024269 seconds and 4 git commands to generate.