const bt_value *input_value;
double weight = 0;
struct bt_common_lttng_live_url_parts parts = {0};
+ bt_common_lttng_live_url_parts_deleter partsDeleter {parts};
/* Used by the logging macros */
__attribute__((unused)) bt_self_component *self_comp = NULL;
BT_ASSERT(!*result);
end:
- bt_common_destroy_lttng_live_url_parts(&parts);
return status;
}
struct lttng_live_session;
struct lttng_live_msg_iter;
+/*
+ * bt_common_lttng_live_url_parts is defined in common code, and is also used
+ * by C code, so it can't be C++-ified yet. Use this separate deleter object
+ * in the mean time.
+ */
+struct bt_common_lttng_live_url_parts_deleter
+{
+ bt_common_lttng_live_url_parts_deleter(bt_common_lttng_live_url_parts& obj) : _mObj {obj}
+ {
+ }
+
+ ~bt_common_lttng_live_url_parts_deleter()
+ {
+ bt_common_destroy_lttng_live_url_parts(&_mObj);
+ }
+
+private:
+ bt_common_lttng_live_url_parts& _mObj;
+};
+
enum lttng_live_stream_state
{
/* This stream won't have data until some known time in the future. */
char error_buf[256] = {0};
const bt2_common::LogCfg& logCfg = viewer_connection->logCfg;
struct bt_common_lttng_live_url_parts lttng_live_url_parts = {0};
+ bt_common_lttng_live_url_parts_deleter partsDeleter {lttng_live_url_parts};
int ret = -1;
if (viewer_connection->url.empty()) {
ret = 0;
end:
- bt_common_destroy_lttng_live_url_parts(<tng_live_url_parts);
return ret;
}