Skip to content

Commit

Permalink
clang-tidy: fixing some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmm committed Mar 15, 2024
1 parent e67aea5 commit 2ba08c1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void on_startup(GApplication* gapp) {
return;
}

util::debug("device "s + device.name + " has changed its input route to: "s + device.input_route_name);
util::debug("device " + device.name + " has changed its input route to: " + device.input_route_name);

NodeInfo target_node;

Expand Down Expand Up @@ -153,7 +153,7 @@ void on_startup(GApplication* gapp) {
return;
}

util::debug("device "s + device.name + " has changed its output route to: "s + device.output_route_name);
util::debug("device " + device.name + " has changed its output route to: " + device.output_route_name);

NodeInfo target_node;

Expand Down
2 changes: 1 addition & 1 deletion src/chart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ auto draw_x_labels(Chart* self, GtkSnapshot* snapshot, const int& width, const i
}
}

draw_unit(self, snapshot, width, height, " "s + self->data->x_unit + " "s);
draw_unit(self, snapshot, width, height, " " + self->data->x_unit + " ");

/*
There is no space left in the window to show the last label. So we skip it.
Expand Down
4 changes: 2 additions & 2 deletions src/lv2_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ auto Lv2Wrapper::map_urid(const std::string& uri) -> LV2_URID {
void Lv2Wrapper::load_ui() {
// preparing the thread that loads the native ui and updates it over time

std::thread ui_updater([=, this]() {
std::thread ui_updater([this]() {
{
std::scoped_lock<std::mutex> lku(ui_mutex);

Expand All @@ -480,7 +480,7 @@ void Lv2Wrapper::load_ui() {

std::string ui_uri = lilv_node_as_uri(lilv_ui_get_uri(ui));

util::debug(plugin_uri + " ui uri: "s + ui_uri);
util::debug(plugin_uri + " ui uri: " + ui_uri);

const LilvNode* binary_node = lilv_ui_get_binary_uri(ui);
const LilvNode* bundle_node = lilv_ui_get_bundle_uri(ui);
Expand Down
1 change: 1 addition & 0 deletions src/pipe_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include <spa/pod/iter.h>
#include <spa/pod/parser.h>
#include <spa/pod/pod.h>
#include <spa/pod/vararg.h>
#include <spa/utils/defs.h>
#include <spa/utils/dict.h>
#include <spa/utils/hook.h>
Expand Down
12 changes: 6 additions & 6 deletions src/pipe_manager_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ void setup(PipeManagerBox* self, app::Application* application) {
self->data->connections.push_back(
application->presets_manager->user_output_preset_created.connect([=](const std::string& preset_name) {
if (preset_name.empty()) {
util::warning("can't retrieve information about the preset file"s);
util::warning("can't retrieve information about the preset file");

return;
}
Expand All @@ -719,7 +719,7 @@ void setup(PipeManagerBox* self, app::Application* application) {
self->data->connections.push_back(
application->presets_manager->user_output_preset_removed.connect([=](const std::string& preset_name) {
if (preset_name.empty()) {
util::warning("can't retrieve information about the preset file"s);
util::warning("can't retrieve information about the preset file");

return;
}
Expand All @@ -736,7 +736,7 @@ void setup(PipeManagerBox* self, app::Application* application) {
self->data->connections.push_back(
application->presets_manager->user_input_preset_created.connect([=](const std::string& preset_name) {
if (preset_name.empty()) {
util::warning("can't retrieve information about the preset file"s);
util::warning("can't retrieve information about the preset file");

return;
}
Expand All @@ -753,7 +753,7 @@ void setup(PipeManagerBox* self, app::Application* application) {
self->data->connections.push_back(
application->presets_manager->user_input_preset_removed.connect([=](const std::string& preset_name) {
if (preset_name.empty()) {
util::warning("can't retrieve information about the preset file"s);
util::warning("can't retrieve information about the preset file");

return;
}
Expand Down Expand Up @@ -836,7 +836,7 @@ void dispose(GObject* object) {
g_object_unref(self->sie_settings);
g_object_unref(self->soe_settings);

util::debug("disposed"s);
util::debug("disposed");

G_OBJECT_CLASS(pipe_manager_box_parent_class)->dispose(object);
}
Expand All @@ -846,7 +846,7 @@ void finalize(GObject* object) {

delete self->data;

util::debug("finalized"s);
util::debug("finalized");

G_OBJECT_CLASS(pipe_manager_box_parent_class)->finalize(object);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ auto parse_spinbutton_output(GtkSpinButton* button, const char* unit, const bool
auto* adjustment = gtk_spin_button_get_adjustment(button);
auto value = gtk_adjustment_get_value(adjustment);
auto precision = gtk_spin_button_get_digits(button);
auto str_unit = (unit != nullptr) ? (" "s + unit) : ""s;
auto str_unit = (unit != nullptr) ? (" "s + unit) : "";

bool minus_infinity = (!lower_bound && value <= util::minimum_db_d_level);

Expand Down

0 comments on commit 2ba08c1

Please sign in to comment.