summaryrefslogtreecommitdiffstats
path: root/commands/command_edit.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2020-03-11 11:30:51 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-11 08:26:30 -0700
commit285fa8acbceebf5dc87c5c3befe42a2917a3b844 (patch)
tree142efc52856b5f4bded40867a917800c241ebfb6 /commands/command_edit.cpp
parentcb28158b9abe10f08142f12f11ddbb5d23686fd5 (diff)
downloadsubsurface-285fa8acbceebf5dc87c5c3befe42a2917a3b844.tar.gz
Grammar: replaces 'indexes' by 'indices'
Grammar-nazi ran git grep -l 'indexes' | xargs sed -i '' -e 's/indexes/indices/g' to prevent future wincing when reading the source code. Unfortunatly, Qt itself is infected as in QModelIndexList QItemSelection::indexes() const Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'commands/command_edit.cpp')
-rw-r--r--commands/command_edit.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/commands/command_edit.cpp b/commands/command_edit.cpp
index 753c67891..6a5e165be 100644
--- a/commands/command_edit.cpp
+++ b/commands/command_edit.cpp
@@ -1041,18 +1041,18 @@ EditWeightBase::EditWeightBase(int index, bool currentDiveOnly) :
// For that purpose, we will determine the indices of the same weightsystem.
std::vector<dive *> divesNew;
divesNew.reserve(dives.size());
- indexes.reserve(dives.size());
+ indices.reserve(dives.size());
for (dive *d: dives) {
if (d == current) {
divesNew.push_back(d);
- indexes.push_back(index);
+ indices.push_back(index);
continue;
}
int idx = find_weightsystem_index(d, ws);
if (idx >= 0) {
divesNew.push_back(d);
- indexes.push_back(idx);
+ indices.push_back(idx);
}
}
dives = std::move(divesNew);
@@ -1081,16 +1081,16 @@ RemoveWeight::RemoveWeight(int index, bool currentDiveOnly) :
void RemoveWeight::undo()
{
for (size_t i = 0; i < dives.size(); ++i) {
- add_to_weightsystem_table(&dives[i]->weightsystems, indexes[i], clone_weightsystem(ws));
- emit diveListNotifier.weightAdded(dives[i], indexes[i]);
+ add_to_weightsystem_table(&dives[i]->weightsystems, indices[i], clone_weightsystem(ws));
+ emit diveListNotifier.weightAdded(dives[i], indices[i]);
}
}
void RemoveWeight::redo()
{
for (size_t i = 0; i < dives.size(); ++i) {
- remove_weightsystem(dives[i], indexes[i]);
- emit diveListNotifier.weightRemoved(dives[i], indexes[i]);
+ remove_weightsystem(dives[i], indices[i]);
+ emit diveListNotifier.weightRemoved(dives[i], indices[i]);
}
}
@@ -1138,8 +1138,8 @@ EditWeight::~EditWeight()
void EditWeight::redo()
{
for (size_t i = 0; i < dives.size(); ++i) {
- set_weightsystem(dives[i], indexes[i], new_ws);
- emit diveListNotifier.weightEdited(dives[i], indexes[i]);
+ set_weightsystem(dives[i], indices[i], new_ws);
+ emit diveListNotifier.weightEdited(dives[i], indices[i]);
}
std::swap(ws, new_ws);
}