Skip to content

Commit e95a471

Browse files
committed
Make IdType::clear noexcept
1 parent a86a14e commit e95a471

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/graphqlservice/GraphQLResponse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ struct [[nodiscard]] IdType
105105
GRAPHQLRESPONSE_EXPORT void reserve(size_t new_cap);
106106
GRAPHQLRESPONSE_EXPORT [[nodiscard]] size_t capacity() const noexcept;
107107
GRAPHQLRESPONSE_EXPORT void shrink_to_fit();
108-
GRAPHQLRESPONSE_EXPORT void clear();
108+
GRAPHQLRESPONSE_EXPORT void clear() noexcept;
109109

110110
// ByteData accessors
111111
GRAPHQLRESPONSE_EXPORT [[nodiscard]] const std::uint8_t& at(size_t pos) const;

src/GraphQLResponse.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ void IdType::shrink_to_fit()
204204
_data);
205205
}
206206

207-
void IdType::clear()
207+
void IdType::clear() noexcept
208208
{
209209
std::visit(
210-
[](auto& data) {
210+
[](auto& data) noexcept {
211211
data.clear();
212212
},
213213
_data);

0 commit comments

Comments
 (0)