From b41f60ce2258a214b6a37fccaece1045242cde7c Mon Sep 17 00:00:00 2001
From: Edward Brown <edward.brown@stfc.ac.uk>
Date: Wed, 23 May 2018 14:17:05 +0100
Subject: [PATCH] Attempted to improve understandablity of enumerateCellsInRow.

- Added descriptive comment.
- Renamed parameters.

Re #22263
---
 .../Common/Batch/QtStandardItemTreeAdapter.h           | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtStandardItemTreeAdapter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtStandardItemTreeAdapter.h
index 5538298533a..f53156b1655 100644
--- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtStandardItemTreeAdapter.h
+++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtStandardItemTreeAdapter.h
@@ -78,12 +78,16 @@ private:
   Cell m_emptyCellStyle;
 };
 
+/**
+ * Enumerates the first `columnCount` number of cells to the right of
+ * startAtCell, moving left to right.
+ */
 template <typename Action>
 void QtStandardItemTreeModelAdapter::enumerateCellsInRow(
-    QModelIndexForMainModel const &startIndex, int columns,
+    QModelIndexForMainModel const &startAtCell, int columnCount,
     Action const &action) const {
-  for (auto i = 0; i < columns; i++) {
-    auto cellIndex = startIndex.sibling(startIndex.row(), i);
+  for (auto i = 0; i < columnCount; i++) {
+    auto cellIndex = startAtCell.sibling(startAtCell.row(), i);
     action(cellIndex, i);
   }
 }
-- 
GitLab