Skip to content

Commit

Permalink
libnixf: const-correctness, for class Diagnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
inclyc committed Jan 22, 2024
1 parent f28ff72 commit 3fb91f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libnixf/include/nixf/Basic/Diagnostic.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ class Diagnostic : public PartialDiagnostic {
return Notes.emplace_back(Kind, Range);
}

std::vector<Note> &notes() { return Notes; }
[[nodiscard]] const std::vector<Note> &notes() const { return Notes; }

Fix &fix(std::string Message) {
return Fixes.emplace_back(Fix{{}, std::move(Message)});
}

const std::vector<Fix> &fixes() { return Fixes; }
[[nodiscard]] const std::vector<Fix> &fixes() const { return Fixes; }

[[nodiscard]] RangeTy range() const { return Range; }

Expand Down

0 comments on commit 3fb91f3

Please sign in to comment.