summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Configuration.cpp2
-rw-r--r--src/server/GraphImpl.cpp32
2 files changed, 17 insertions, 17 deletions
diff --git a/src/Configuration.cpp b/src/Configuration.cpp
index a00cea98..5178e97a 100644
--- a/src/Configuration.cpp
+++ b/src/Configuration.cpp
@@ -318,7 +318,7 @@ Configuration::save(URIMap& uri_map,
writer);
// Write a statement for each valid option
- for (auto o : _options) {
+ for (const auto& o : _options) {
const Atom& value = o.second.value;
if (!(o.second.scope & scopes) ||
o.second.key.empty() ||
diff --git a/src/server/GraphImpl.cpp b/src/server/GraphImpl.cpp
index 05bc6e4a..c00819c2 100644
--- a/src/server/GraphImpl.cpp
+++ b/src/server/GraphImpl.cpp
@@ -87,17 +87,17 @@ GraphImpl::duplicate(Engine& engine,
// Add duplicates of all ports
dup->_ports = bufs.maid().make_managed<Ports>(num_ports(), nullptr);
- for (PortList::iterator p = _inputs.begin(); p != _inputs.end(); ++p) {
- DuplexPort* p_dup = p->duplicate(engine, p->symbol(), dup);
+ for (auto& p : _inputs) {
+ DuplexPort* p_dup = p.duplicate(engine, p.symbol(), dup);
dup->_inputs.push_front(*p_dup);
- (*dup->_ports)[p->index()] = p_dup;
- port_map.insert({&*p, p_dup});
+ (*dup->_ports)[p.index()] = p_dup;
+ port_map.insert({&p, p_dup});
}
- for (PortList::iterator p = _outputs.begin(); p != _outputs.end(); ++p) {
- DuplexPort* p_dup = p->duplicate(engine, p->symbol(), dup);
+ for (auto& p : _outputs) {
+ DuplexPort* p_dup = p.duplicate(engine, p.symbol(), dup);
dup->_outputs.push_front(*p_dup);
- (*dup->_ports)[p->index()] = p_dup;
- port_map.insert({&*p, p_dup});
+ (*dup->_ports)[p.index()] = p_dup;
+ port_map.insert({&p, p_dup});
}
// Add duplicates of all blocks
@@ -321,14 +321,14 @@ GraphImpl::has_port_with_index(uint32_t index) const
BufferFactory& bufs = *_engine.buffer_factory();
const auto index_atom = bufs.forge().make(int32_t(index));
- for (auto p = _inputs.begin(); p != _inputs.end(); ++p) {
- if (p->has_property(bufs.uris().lv2_index, index_atom)) {
+ for (const auto& p : _inputs) {
+ if (p.has_property(bufs.uris().lv2_index, index_atom)) {
return true;
}
}
- for (auto p = _outputs.begin(); p != _outputs.end(); ++p) {
- if (p->has_property(bufs.uris().lv2_index, index_atom)) {
+ for (const auto& p : _outputs) {
+ if (p.has_property(bufs.uris().lv2_index, index_atom)) {
return true;
}
}
@@ -362,11 +362,11 @@ GraphImpl::build_ports_array(Raul::Maid& maid)
MPtr<Ports> result = maid.make_managed<Ports>(n);
std::map<size_t, DuplexPort*> ports;
- for (PortList::iterator p = _inputs.begin(); p != _inputs.end(); ++p) {
- ports.emplace(p->index(), &*p);
+ for (auto& p : _inputs) {
+ ports.emplace(p.index(), &p);
}
- for (PortList::iterator p = _outputs.begin(); p != _outputs.end(); ++p) {
- ports.emplace(p->index(), &*p);
+ for (auto& p : _outputs) {
+ ports.emplace(p.index(), &p);
}
size_t i = 0;