summaryrefslogtreecommitdiffstats
path: root/src/PatchageCanvas.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-27 17:57:49 +0100
committerDavid Robillard <d@drobilla.net>2020-11-27 21:42:51 +0100
commit5cdc8bd8da6b7a6b1990ed2d7be483e19f9d7837 (patch)
tree7942e9a36ce1d13f861c5dc190928bc4fb416e25 /src/PatchageCanvas.cpp
parent5a07dbc89f1459c57b44e10248669a94e7881525 (diff)
downloadpatchage-5cdc8bd8da6b7a6b1990ed2d7be483e19f9d7837.tar.gz
patchage-5cdc8bd8da6b7a6b1990ed2d7be483e19f9d7837.tar.bz2
patchage-5cdc8bd8da6b7a6b1990ed2d7be483e19f9d7837.zip
Use C++ casts
Unfortunately, the warning needs to stay on because of Gtk and ALSA.
Diffstat (limited to 'src/PatchageCanvas.cpp')
-rw-r--r--src/PatchageCanvas.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp
index 1dfe9e0..e081acb 100644
--- a/src/PatchageCanvas.cpp
+++ b/src/PatchageCanvas.cpp
@@ -147,7 +147,7 @@ struct RemovePortsData
static void
delete_port_if_matches(GanvPort* port, void* cdata)
{
- auto* data = (RemovePortsData*)cdata;
+ auto* data = static_cast<RemovePortsData*>(cdata);
auto* pport = dynamic_cast<PatchagePort*>(Glib::wrap(port));
if (pport && data->pred(pport)) {
delete pport;
@@ -167,7 +167,7 @@ remove_ports_matching(GanvNode* node, void* cdata)
return;
}
- auto* data = (RemovePortsData*)cdata;
+ auto* data = static_cast<RemovePortsData*>(cdata);
pmodule->for_each_port(delete_port_if_matches, data);
@@ -310,7 +310,7 @@ PatchageCanvas::add_module(const std::string& name, PatchageModule* module)
static void
disconnect_edge(GanvEdge* edge, void* data)
{
- auto* canvas = (PatchageCanvas*)data;
+ auto* canvas = static_cast<PatchageCanvas*>(data);
Ganv::Edge* edgemm = Glib::wrap(edge);
canvas->disconnect(edgemm->get_tail(), edgemm->get_head());
}