summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-09-27 16:51:54 -0400
committerDavid Robillard <d@drobilla.net>2022-09-27 16:51:54 -0400
commit1546edc9bed5a4f82088578e73447699feed1216 (patch)
tree0769ae7f048f9796c26740fc8c3c68ce3543027c /src
parentf4866b97d444dcdc6275a13f6be1f8a9e039d927 (diff)
downloadingen-1546edc9bed5a4f82088578e73447699feed1216.tar.gz
ingen-1546edc9bed5a4f82088578e73447699feed1216.tar.bz2
ingen-1546edc9bed5a4f82088578e73447699feed1216.zip
Fix field shadowing
Diffstat (limited to 'src')
-rw-r--r--src/client/GraphModel.cpp23
-rw-r--r--src/server/GraphImpl.cpp14
2 files changed, 19 insertions, 18 deletions
diff --git a/src/client/GraphModel.cpp b/src/client/GraphModel.cpp
index 2fed1fb3..a8a40ec7 100644
--- a/src/client/GraphModel.cpp
+++ b/src/client/GraphModel.cpp
@@ -75,7 +75,7 @@ GraphModel::remove_arcs_on(const std::shared_ptr<PortModel>& p)
{
// Remove any connections which referred to this object,
// since they can't possibly exist anymore
- for (auto j = _arcs.begin(); j != _arcs.end();) {
+ for (auto j = _graph_arcs.begin(); j != _graph_arcs.end();) {
auto next = j;
++next;
@@ -85,7 +85,7 @@ GraphModel::remove_arcs_on(const std::shared_ptr<PortModel>& p)
|| arc->head_path().parent() == p->path()
|| arc->head_path() == p->path()) {
_signal_removed_arc.emit(arc);
- _arcs.erase(j); // Cuts our reference
+ _graph_arcs.erase(j); // Cuts our reference
}
j = next;
}
@@ -94,19 +94,19 @@ GraphModel::remove_arcs_on(const std::shared_ptr<PortModel>& p)
void
GraphModel::clear()
{
- _arcs.clear();
+ _graph_arcs.clear();
BlockModel::clear();
- assert(_arcs.empty());
+ assert(_graph_arcs.empty());
assert(_ports.empty());
}
std::shared_ptr<ArcModel>
GraphModel::get_arc(const Node* tail, const Node* head)
{
- auto i = _arcs.find(std::make_pair(tail, head));
- if (i != _arcs.end()) {
+ auto i = _graph_arcs.find(std::make_pair(tail, head));
+ if (i != _graph_arcs.end()) {
return std::dynamic_pointer_cast<ArcModel>(i->second);
}
@@ -142,8 +142,9 @@ GraphModel::add_arc(const std::shared_ptr<ArcModel>& arc)
assert(arc->tail() == existing->tail());
assert(arc->head() == existing->head());
} else {
- _arcs.emplace(std::make_pair(arc->tail().get(), arc->head().get()),
- arc);
+ _graph_arcs.emplace(std::make_pair(arc->tail().get(),
+ arc->head().get()),
+ arc);
_signal_new_arc.emit(arc);
}
}
@@ -151,11 +152,11 @@ GraphModel::add_arc(const std::shared_ptr<ArcModel>& arc)
void
GraphModel::remove_arc(const Node* tail, const Node* head)
{
- auto i = _arcs.find(std::make_pair(tail, head));
- if (i != _arcs.end()) {
+ auto i = _graph_arcs.find(std::make_pair(tail, head));
+ if (i != _graph_arcs.end()) {
auto arc = std::dynamic_pointer_cast<ArcModel>(i->second);
_signal_removed_arc.emit(arc);
- _arcs.erase(i);
+ _graph_arcs.erase(i);
}
}
diff --git a/src/server/GraphImpl.cpp b/src/server/GraphImpl.cpp
index 86a70495..1ed6c37f 100644
--- a/src/server/GraphImpl.cpp
+++ b/src/server/GraphImpl.cpp
@@ -122,7 +122,7 @@ GraphImpl::duplicate(Engine& engine,
}
// Add duplicates of all arcs
- for (const auto& a : _arcs) {
+ for (const auto& a : _graph_arcs) {
auto arc = std::dynamic_pointer_cast<ArcImpl>(a.second);
if (arc) {
auto t = port_map.find(arc->tail());
@@ -285,17 +285,17 @@ void
GraphImpl::add_arc(const std::shared_ptr<ArcImpl>& a)
{
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
- _arcs.emplace(std::make_pair(a->tail(), a->head()), a);
+ _graph_arcs.emplace(std::make_pair(a->tail(), a->head()), a);
}
std::shared_ptr<ArcImpl>
GraphImpl::remove_arc(const PortImpl* tail, const PortImpl* dst_port)
{
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
- auto i = _arcs.find(std::make_pair(tail, dst_port));
- if (i != _arcs.end()) {
+ auto i = _graph_arcs.find(std::make_pair(tail, dst_port));
+ if (i != _graph_arcs.end()) {
auto arc = std::dynamic_pointer_cast<ArcImpl>(i->second);
- _arcs.erase(i);
+ _graph_arcs.erase(i);
return arc;
}
@@ -306,8 +306,8 @@ bool
GraphImpl::has_arc(const PortImpl* tail, const PortImpl* dst_port) const
{
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
- auto i = _arcs.find(std::make_pair(tail, dst_port));
- return (i != _arcs.end());
+ auto i = _graph_arcs.find(std::make_pair(tail, dst_port));
+ return (i != _graph_arcs.end());
}
void