Skip to content

Commit 4a5b319

Browse files
committed
fix(mass_balance): use conditinonal macro for nodiscard attribute (c++17)
1 parent 8777659 commit 4a5b319

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/utilities/bmi/mass_balance.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ namespace models{ namespace bmi{ namespace protocols{
104104
* @return expected<void, ProtocolError> May contain a ProtocolError if
105105
* the protocol is not supported by the model.
106106
*/
107-
[[nodiscard]] auto check_support(const ModelPtr& model) -> expected<void, ProtocolError> override;
107+
nsel_NODISCARD auto check_support(const ModelPtr& model) -> expected<void, ProtocolError> override;
108108

109109
/**
110110
* @brief Check the model for support and initialize the mass balance protocol from the given properties.

include/utilities/bmi/protocol.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class NgenBmiProtocol{
143143
* the protocol fails for any reason. Errors of ProtocolError::PROTOCOL_WARNING
144144
* severity should be logged as warnings, but not cause the simulation to fail.
145145
*/
146-
[[nodiscard]] virtual auto run(const ModelPtr& model, const Context& ctx) const -> expected<void, ProtocolError> = 0;
146+
nsel_NODISCARD virtual auto run(const ModelPtr& model, const Context& ctx) const -> expected<void, ProtocolError> = 0;
147147

148148
/**
149149
* @brief Check if the BMI protocol is supported by the model
@@ -158,7 +158,7 @@ class NgenBmiProtocol{
158158
* @return expected<void, ProtocolError> May contain a ProtocolError if
159159
* the protocol is not supported by the model.
160160
*/
161-
[[nodiscard]] virtual expected<void, ProtocolError> check_support(const ModelPtr& model) = 0;
161+
nsel_NODISCARD virtual expected<void, ProtocolError> check_support(const ModelPtr& model) = 0;
162162

163163
/**
164164
* @brief Initialize the BMI protocol from a set of key/value properties

0 commit comments

Comments
 (0)