commit a7910f75c754ef1a7b00bec15a247580625f3e72
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Sun Jun 22 20:02:43 2025 +0200
Use const reference in range-base for loop
Spotted by cppcheck.
---
src/TexRow.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/TexRow.cpp b/src/TexRow.cpp
index 9a40c60795..38c3bffe30 100644
--- a/src/TexRow.cpp
+++ b/src/TexRow.cpp
@@ -267,7 +267,7 @@ TexRow::getEntriesFromRow(int const row) const
return rowlist_[j].getTextEntry();
// Check the absence of begin_document at row j. The
begin_document row
// entry is used to prevent mixing of body and preamble.
- for (RowEntry entry : rowlist_[j])
+ for (RowEntry const & entry : rowlist_[j])
if (entry.type == begin_document)
return text_none;
}
@@ -283,7 +283,7 @@ TexRow::getEntriesFromRow(int const row) const
TextEntry last_pos = {start.id, -1};
// find the next occurence of paragraph start.id
for (size_t j = i + 1; j < rowlist_.size(); ++j) {
- for (RowEntry entry : rowlist_[j]) {
+ for (RowEntry const & entry : rowlist_[j]) {
if (entry.type == begin_document)
// what happens in the preamble remains
in the preamble
return last_pos;
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs