From 1af5fc3b2ee53771eed6997401aa198107f21f52 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 11 Oct 2024 18:35:16 -0400 Subject: Add missing const qualifiers --- src/Patchage.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/Patchage.cpp') diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 718200a..54f81f0 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -171,8 +171,7 @@ update_labels(GanvNode* node, void* data) const bool human_names = *static_cast(data); if (GANV_IS_MODULE(node)) { Ganv::Module* gmod = Glib::wrap(GANV_MODULE(node)); - auto* pmod = dynamic_cast(gmod); - if (pmod) { + if (dynamic_cast(gmod)) { for (Ganv::Port* gport : *gmod) { auto* pport = dynamic_cast(gport); if (pport) { @@ -204,12 +203,11 @@ update_port_colors(GanvNode* node, void* data) } Ganv::Module* gmod = Glib::wrap(GANV_MODULE(node)); - auto* pmod = dynamic_cast(gmod); - if (!pmod) { + if (!dynamic_cast(gmod)) { return; } - for (Ganv::Port* p : *pmod) { + for (Ganv::Port* p : *gmod) { auto* port = dynamic_cast(p); if (port) { const uint32_t rgba = patchage->conf().get_port_color(port->type()); @@ -226,7 +224,7 @@ update_edge_color(GanvEdge* edge, void* data) Ganv::Edge* edgemm = Glib::wrap(edge); if (edgemm) { - auto* tail = dynamic_cast((edgemm)->get_tail()); + const auto* tail = dynamic_cast((edgemm)->get_tail()); if (tail) { edgemm->set_color(patchage->conf().get_port_color(tail->type())); } -- cgit v1.2.1