summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/GraphCanvas.cpp18
-rw-r--r--src/server/BlockImpl.cpp8
-rw-r--r--src/server/JackDriver.cpp2
-rw-r--r--src/server/LV2Block.cpp6
-rw-r--r--src/server/PreProcessor.cpp2
-rw-r--r--src/server/ingen_lv2.cpp4
6 files changed, 20 insertions, 20 deletions
diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp
index 2c08fb47..7b0fb095 100644
--- a/src/gui/GraphCanvas.cpp
+++ b/src/gui/GraphCanvas.cpp
@@ -611,14 +611,14 @@ destroy_node(GanvNode* node, void* data)
return;
}
- App* app = static_cast<App*>(data);
+ const App* app = static_cast<App*>(data);
Ganv::Module* module = Glib::wrap(GANV_MODULE(node));
- auto* node_module = dynamic_cast<NodeModule*>(module);
+ const auto* node_module = dynamic_cast<NodeModule*>(module);
if (node_module) {
app->interface()->del(node_module->block()->uri());
} else {
- auto* port_module = dynamic_cast<GraphPortModule*>(module);
+ const auto* port_module = dynamic_cast<GraphPortModule*>(module);
if (port_module &&
strcmp(port_module->port()->path().symbol(), "control") &&
strcmp(port_module->port()->path().symbol(), "notify")) {
@@ -630,11 +630,11 @@ destroy_node(GanvNode* node, void* data)
static void
destroy_arc(GanvEdge* arc, void* data)
{
- App* app = static_cast<App*>(data);
+ const App* app = static_cast<App*>(data);
Ganv::Edge* arcmm = Glib::wrap(arc);
- Port* tail = dynamic_cast<Port*>(arcmm->get_tail());
- Port* head = dynamic_cast<Port*>(arcmm->get_head());
+ const Port* tail = dynamic_cast<Port*>(arcmm->get_tail());
+ const Port* head = dynamic_cast<Port*>(arcmm->get_head());
app->interface()->disconnect(tail->model()->path(), head->model()->path());
}
@@ -659,12 +659,12 @@ serialise_node(GanvNode* node, void* data)
}
Ganv::Module* module = Glib::wrap(GANV_MODULE(node));
- auto* node_module = dynamic_cast<NodeModule*>(module);
+ const auto* node_module = dynamic_cast<NodeModule*>(module);
if (node_module) {
serialiser->serialise(node_module->block());
} else {
- auto* port_module = dynamic_cast<GraphPortModule*>(module);
+ const auto* port_module = dynamic_cast<GraphPortModule*>(module);
if (port_module) {
serialiser->serialise(port_module->port());
}
@@ -679,7 +679,7 @@ serialise_arc(GanvEdge* arc, void* data)
return;
}
- auto* garc = dynamic_cast<gui::Arc*>(Glib::wrap(GANV_EDGE(arc)));
+ const auto* garc = dynamic_cast<gui::Arc*>(Glib::wrap(GANV_EDGE(arc)));
if (garc) {
serialiser->serialise_arc(Sord::Node(), garc->model());
}
diff --git a/src/server/BlockImpl.cpp b/src/server/BlockImpl.cpp
index 658df0b6..308f1e78 100644
--- a/src/server/BlockImpl.cpp
+++ b/src/server/BlockImpl.cpp
@@ -203,8 +203,8 @@ BlockImpl::bypass(RunContext& ctx)
// Dumb bypass
for (const PortType t : { PortType::AUDIO, PortType::CV, PortType::ATOM }) {
for (uint32_t i = 0;; ++i) {
- PortImpl* in = nth_port_by_type(i, true, t);
- PortImpl* out = nth_port_by_type(i, false, t);
+ const PortImpl* in = nth_port_by_type(i, true, t);
+ const PortImpl* out = nth_port_by_type(i, false, t);
if (!out) {
break; // Finished writing all outputs
}
@@ -241,7 +241,7 @@ BlockImpl::process(RunContext& ctx)
// Find earliest offset of a value change
SampleCount chunk_end = ctx.nframes();
for (uint32_t i = 0; _ports && i < _ports->size(); ++i) {
- PortImpl* const port = _ports->at(i);
+ const PortImpl* const port = _ports->at(i);
if (port->type() == PortType::CONTROL && port->is_input()) {
const SampleCount o = port->next_value_offset(
offset, ctx.nframes());
@@ -265,7 +265,7 @@ BlockImpl::process(RunContext& ctx)
// Emit control port outputs as events
for (uint32_t i = 0; _ports && i < _ports->size(); ++i) {
- PortImpl* const port = _ports->at(i);
+ const PortImpl* const port = _ports->at(i);
if (port->type() == PortType::CONTROL && port->is_output()) {
// TODO: Only emit events when value has actually changed?
for (uint32_t v = 0; v < _polyphony; ++v) {
diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp
index 6624939e..b1541df1 100644
--- a/src/server/JackDriver.cpp
+++ b/src/server/JackDriver.cpp
@@ -263,7 +263,7 @@ void
JackDriver::rename_port(const raul::Path& old_path,
const raul::Path& new_path)
{
- EnginePort* eport = get_port(old_path);
+ const EnginePort* eport = get_port(old_path);
if (eport) {
#if USE_JACK_PORT_RENAME
jack_port_rename(_client,
diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp
index c5cd73dc..07d3da48 100644
--- a/src/server/LV2Block.cpp
+++ b/src/server/LV2Block.cpp
@@ -110,7 +110,7 @@ LV2Block::make_instance(URIs& uris,
}
for (uint32_t p = 0; p < num_ports(); ++p) {
- PortImpl* const port = _ports->at(p);
+ const PortImpl* const port = _ports->at(p);
Buffer* const buffer = (preparing)
? port->prepared_buffer(voice).get()
: port->buffer(voice).get();
@@ -693,8 +693,8 @@ get_port_value(const char* port_symbol,
uint32_t* size,
uint32_t* type)
{
- auto* const block = static_cast<LV2Block*>(user_data);
- auto* const port = block->port_by_symbol(port_symbol);
+ auto* const block = static_cast<LV2Block*>(user_data);
+ const auto* const port = block->port_by_symbol(port_symbol);
if (port && port->is_input() && port->value().is_valid()) {
*size = port->value().size();
diff --git a/src/server/PreProcessor.cpp b/src/server/PreProcessor.cpp
index 5d9d4660..6cadf53b 100644
--- a/src/server/PreProcessor.cpp
+++ b/src/server/PreProcessor.cpp
@@ -64,7 +64,7 @@ PreProcessor::event(Event* const ev, Event::Mode mode)
/* Note that tail is only used here, not in process(). The head must be
checked first here, since if it is null the tail pointer is junk. */
- Event* const head = _head.load();
+ const Event* const head = _head.load();
if (!head) {
_head = ev;
_tail = ev;
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index bb9780ca..930f350d 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -615,8 +615,8 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
static void
ingen_connect_port(LV2_Handle instance, uint32_t port, void* data)
{
- auto* me = static_cast<IngenPlugin*>(instance);
- Engine* engine = static_cast<Engine*>(me->world->engine().get());
+ auto* me = static_cast<IngenPlugin*>(instance);
+ const Engine* engine = static_cast<Engine*>(me->world->engine().get());
const auto driver = std::static_pointer_cast<LV2Driver>(engine->driver());
if (port < driver->ports().size()) {
driver->ports().at(port)->set_buffer(data);