Skip to content

Commit

Permalink
test: [[nodiscard]] to make the linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Dec 12, 2024
1 parent 41c41e9 commit b9c50bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/entt/meta/meta_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct clazz: base {
clazz(int val)
: value{val} {}

explicit operator int() const noexcept {
[[nodiscard]] explicit operator int() const noexcept {
return get_int();
}

Expand All @@ -33,15 +33,15 @@ struct clazz: base {
value = val.value;
}

int get_int() const noexcept {
[[nodiscard]] int get_int() const noexcept {
return value;
}

static std::string to_string(const clazz &instance) {
[[nodiscard]] static std::string to_string(const clazz &instance) {
return std::to_string(instance.get_int());
}

static clazz from_string(const std::string &value) {
[[nodiscard]] static clazz from_string(const std::string &value) {
return clazz{std::stoi(value)};
}

Expand Down

0 comments on commit b9c50bc

Please sign in to comment.