summaryrefslogtreecommitdiffstats
path: root/src/Store.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Store.cpp')
-rw-r--r--src/Store.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Store.cpp b/src/Store.cpp
index 1dd5b146..363ffb41 100644
--- a/src/Store.cpp
+++ b/src/Store.cpp
@@ -134,14 +134,13 @@ Store::child_name_offset(const raul::Path& parent,
if (offset > 0) {
ss << "_" << offset;
}
+
if (find(parent.child(raul::Symbol(ss.str()))) == end() &&
(allow_zero || offset > 0)) {
break;
- } else if (offset == 0) {
- offset = 2;
- } else {
- ++offset;
}
+
+ offset = (offset == 0) ? 2 : (offset + 1);
}
return offset;