Skip to content

Commit 6154f7b

Browse files
committed
More const
1 parent a48d4a0 commit 6154f7b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.clang-tidy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Checks: '-*,misc-const-correctness'
2+
Checks: '-*,misc-const-correctness,performance-for-range-copy,readability-make-member-function-const'
33
WarningsAsErrors: ''
44
CheckOptions:
55
- key: misc-const-correctness.AnalyzeValues

liblangutil/Exceptions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class Error: virtual public util::Exception
215215
/// helper functions
216216
static Error const* containsErrorOfType(ErrorList const& _list, Error::Type _type)
217217
{
218-
for (auto e: _list)
218+
for (auto const& e: _list)
219219
if (e->type() == _type)
220220
return e.get();
221221
return nullptr;
@@ -250,7 +250,7 @@ class Error: virtual public util::Exception
250250

251251
static bool containsErrors(ErrorList const& _list)
252252
{
253-
for (auto e: _list)
253+
for (auto const& e: _list)
254254
if (isError(e->type()))
255255
return true;
256256
return false;

0 commit comments

Comments
 (0)