Skip to content

Commit 2c6dd17

Browse files
committed
Add [[nodiscard]] in some places
1 parent a9015e4 commit 2c6dd17

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/osmcoastline_segments.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ class InputFile {
6666
}
6767
}
6868

69-
int fd() const noexcept {
69+
[[nodiscard]] int fd() const noexcept {
7070
return m_fd;
7171
}
7272

73-
std::size_t size() const {
73+
[[nodiscard]] std::size_t size() const {
7474
struct stat s; // NOLINT(cppcoreguidelines-pro-type-member-init, hicpp-member-init)
7575
if (::fstat(m_fd, &s) != 0) {
7676
throw std::system_error{errno, std::system_category(), std::string{"Can't get file size for '"} + m_filename + "'"};

src/osmcoastline_ways.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class CoastlineWaysHandler : public osmium::handler::Handler {
100100
}
101101
}
102102

103-
double sum_length() const noexcept {
103+
[[nodiscard]] double sum_length() const noexcept {
104104
return m_length;
105105
}
106106

0 commit comments

Comments
 (0)