summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-02 12:19:54 +0200
committerDavid Robillard <d@drobilla.net>2020-08-02 12:51:11 +0200
commit8123b3ff3aee3a161723c06a0d88141a0e8b7841 (patch)
tree82401219c53b678fcb3eab92904428e7b570a691 /src/server
parent8e0ab708ccb604c3224da2386dde609cb30de2b7 (diff)
downloadingen-8123b3ff3aee3a161723c06a0d88141a0e8b7841.tar.gz
ingen-8123b3ff3aee3a161723c06a0d88141a0e8b7841.tar.bz2
ingen-8123b3ff3aee3a161723c06a0d88141a0e8b7841.zip
Fix shadow warnings
Diffstat (limited to 'src/server')
-rw-r--r--src/server/Buffer.cpp4
-rw-r--r--src/server/Buffer.hpp4
-rw-r--r--src/server/CompiledGraph.cpp13
-rw-r--r--src/server/Engine.cpp4
-rw-r--r--src/server/LV2Block.cpp10
-rw-r--r--src/server/UndoStack.cpp18
-rw-r--r--src/server/UndoStack.hpp2
-rw-r--r--src/server/events/Delta.cpp9
-rw-r--r--src/server/mix.cpp8
9 files changed, 39 insertions, 33 deletions
diff --git a/src/server/Buffer.cpp b/src/server/Buffer.cpp
index 084e8e72..4e62abd4 100644
--- a/src/server/Buffer.cpp
+++ b/src/server/Buffer.cpp
@@ -100,12 +100,12 @@ Buffer::recycle()
}
void
-Buffer::set_type(GetFn get, LV2_URID type, LV2_URID value_type)
+Buffer::set_type(GetFn get_func, LV2_URID type, LV2_URID value_type)
{
_type = type;
_value_type = value_type;
if (type == _factory.uris().atom_Sequence && value_type) {
- _value_buffer = (_factory.*get)(value_type, 0, 0);
+ _value_buffer = (_factory.*get_func)(value_type, 0, 0);
}
}
diff --git a/src/server/Buffer.hpp b/src/server/Buffer.hpp
index e22e89e6..7593900e 100644
--- a/src/server/Buffer.hpp
+++ b/src/server/Buffer.hpp
@@ -73,11 +73,11 @@ public:
/** Set the buffer type and optional value type for this buffer.
*
- * @param get Called to get auxiliary buffers if necessary.
+ * @param get_func Called to get auxiliary buffers if necessary.
* @param type Type of buffer.
* @param value_type Type of values in buffer if applicable (for sequences).
*/
- void set_type(GetFn get, LV2_URID type, LV2_URID value_type);
+ void set_type(GetFn get_func, LV2_URID type, LV2_URID value_type);
inline bool is_audio() const {
return _type == _factory.uris().atom_Sound;
diff --git a/src/server/CompiledGraph.cpp b/src/server/CompiledGraph.cpp
index dbd8b062..ba4cc11e 100644
--- a/src/server/CompiledGraph.cpp
+++ b/src/server/CompiledGraph.cpp
@@ -39,13 +39,16 @@ namespace server {
/** Graph contains ambiguous feedback with no delay nodes. */
class FeedbackException : public std::exception {
public:
- explicit FeedbackException(const BlockImpl* node,
- const BlockImpl* root = nullptr)
- : node(node), root(root)
+ explicit FeedbackException(const BlockImpl* n)
+ : node(n)
{}
- const BlockImpl* node;
- const BlockImpl* root;
+ FeedbackException(const BlockImpl* n, const BlockImpl* r)
+ : node(n), root(r)
+ {}
+
+ const BlockImpl* node = nullptr;
+ const BlockImpl* root = nullptr;
};
static bool
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp
index 087be26c..cfe9757a 100644
--- a/src/server/Engine.cpp
+++ b/src/server/Engine.cpp
@@ -155,8 +155,8 @@ Engine::~Engine()
// Delete run contexts
_quit_flag = true;
_tasks_available.notify_all();
- for (const auto& ctx : _run_contexts) {
- ctx->join();
+ for (const auto& thread_ctx : _run_contexts) {
+ thread_ctx->join();
}
const SPtr<Store> store = this->store();
diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp
index 090ae8af..0bdcacc2 100644
--- a/src/server/LV2Block.cpp
+++ b/src/server/LV2Block.cpp
@@ -406,10 +406,10 @@ LV2Block::instantiate(BufferFactory& bufs, const LilvState* state)
for (int p = 0; preds[p]; ++p) {
LilvNodes* values = lilv_port_get_value(plug, id, preds[p]);
LILV_FOREACH(nodes, v, values) {
- const LilvNode* val = lilv_nodes_get(values, v);
- if (lilv_node_is_uri(val)) {
+ const LilvNode* value = lilv_nodes_get(values, v);
+ if (lilv_node_is_uri(value)) {
port->add_property(URI(lilv_node_as_uri(preds[p])),
- forge.make_urid(URI(lilv_node_as_uri(val))));
+ forge.make_urid(URI(lilv_node_as_uri(value))));
}
}
lilv_nodes_free(values);
@@ -713,13 +713,13 @@ LV2Block::save_preset(const URI& uri,
lilv_state_save(lworld, lmap, lunmap, state, nullptr,
dirname.c_str(), basename.c_str());
- const URI uri(lilv_node_as_uri(lilv_state_get_uri(state)));
+ const URI state_uri(lilv_node_as_uri(lilv_state_get_uri(state)));
const std::string label(lilv_state_get_label(state)
? lilv_state_get_label(state)
: basename);
lilv_state_free(state);
- Resource preset(_uris, uri);
+ Resource preset(_uris, state_uri);
preset.set_property(_uris.rdf_type, _uris.pset_Preset);
preset.set_property(_uris.rdfs_label, world.forge().alloc(label));
preset.set_property(_uris.lv2_appliesTo,
diff --git a/src/server/UndoStack.cpp b/src/server/UndoStack.cpp
index 7aea1ba5..82527d12 100644
--- a/src/server/UndoStack.cpp
+++ b/src/server/UndoStack.cpp
@@ -118,7 +118,7 @@ UndoStack::pop()
}
struct BlankIDs {
- explicit BlankIDs(char c='b') : c(c) {}
+ explicit BlankIDs(char prefix='b') : c(prefix) {}
SerdNode get() {
snprintf(buf, sizeof(buf), "%c%u", c, n++);
@@ -131,12 +131,16 @@ struct BlankIDs {
};
struct ListContext {
- explicit ListContext(BlankIDs& ids, unsigned flags, const SerdNode* s, const SerdNode* p)
- : ids(ids)
- , s(*s)
- , p(*p)
- , flags(flags | SERD_LIST_O_BEGIN)
- {}
+ explicit ListContext(BlankIDs& blank_ids,
+ unsigned statement_flags,
+ const SerdNode* subject,
+ const SerdNode* predicate)
+ : ids(blank_ids)
+ , s(*subject)
+ , p(*predicate)
+ , flags(statement_flags | SERD_LIST_O_BEGIN)
+ {
+ }
SerdNode start_node(SerdWriter* writer) {
const SerdNode node = ids.get();
diff --git a/src/server/UndoStack.hpp b/src/server/UndoStack.hpp
index 22d48379..74cb6cfe 100644
--- a/src/server/UndoStack.hpp
+++ b/src/server/UndoStack.hpp
@@ -41,7 +41,7 @@ namespace server {
class INGEN_API UndoStack : public AtomSink {
public:
struct Entry {
- Entry(time_t time=0) : time(time) {}
+ Entry(time_t t=0) : time(t) {}
Entry(const Entry& copy)
: time(copy.time)
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 28919a50..87f855ee 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -423,9 +423,8 @@ Delta::pre_process(PreProcessContext& ctx)
} else if (value.type() != uris.forge.Bool) {
_status = Status::BAD_VALUE_TYPE;
} else {
- op = SpecialType::POLYPHONIC;
+ op = SpecialType::POLYPHONIC;
obj->set_property(key, value, value.context());
- auto* block = dynamic_cast<BlockImpl*>(obj);
if (block) {
block->set_polyphonic(value.get<int32_t>());
}
@@ -446,9 +445,9 @@ Delta::pre_process(PreProcessContext& ctx)
lilv_world_load_bundle(lworld, bundle);
const auto new_plugins = _engine.block_factory()->refresh();
- for (const auto& p : new_plugins) {
- if (p->bundle_uri() == lilv_node_as_string(bundle)) {
- _update.put_plugin(p.get());
+ for (const auto& plugin : new_plugins) {
+ if (plugin->bundle_uri() == lilv_node_as_string(bundle)) {
+ _update.put_plugin(plugin.get());
}
}
lilv_node_free(bundle);
diff --git a/src/server/mix.cpp b/src/server/mix.cpp
index 6bd36ab1..aa9d5a1d 100644
--- a/src/server/mix.cpp
+++ b/src/server/mix.cpp
@@ -58,12 +58,12 @@ mix(const RunContext& ctx,
for (uint32_t i = 1; i < num_srcs; ++i) {
const Sample* __restrict const in = srcs[i]->samples();
if (srcs[i]->is_control()) { // control => audio
- for (SampleCount i = 0; i < end; ++i) {
- out[i] += in[0];
+ for (SampleCount j = 0; j < end; ++j) {
+ out[j] += in[0];
}
} else if (srcs[i]->is_audio()) { // audio => audio
- for (SampleCount i = 0; i < end; ++i) {
- out[i] += in[i];
+ for (SampleCount j = 0; j < end; ++j) {
+ out[j] += in[j];
}
} else if (srcs[i]->is_sequence()) { // sequence => audio
dst->render_sequence(ctx, srcs[i], true);