Skip to content

Commit 29d3f1d

Browse files
authored
Fix some unused parameters warnings
1 parent e29d43e commit 29d3f1d

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

include/rfl/OneOf.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct OneOf {
4343
static rfl::Result<T> validate_impl(const T& _value,
4444
std::vector<Error> _errors) {
4545
return Head::validate(_value)
46-
.and_then([&](auto&& _result) -> rfl::Result<T> {
46+
.and_then([&]([[maybe_unused]] auto&& _result) -> rfl::Result<T> {
4747
if constexpr (sizeof...(Tail) == 0) {
4848
if (_errors.size() == sizeof...(Cs)) {
4949
return _value;

include/rfl/parsing/Parser_basic_type.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ struct Parser<R, W, T, ProcessorsType> {
5555

5656
/// Generates a schema for the underlying type.
5757
static schema::Type to_schema(
58-
std::map<std::string, schema::Type>* _definitions) {
58+
[[maybe_unused]] std::map<std::string, schema::Type>* _definitions) {
5959
using U = std::remove_cvref_t<T>;
6060
using Type = schema::Type;
6161
if constexpr (std::is_same<U, bool>()) {

include/rfl/toml/Writer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class RFL_API Writer {
4343
OutputVarType null_as_root() const;
4444

4545
template <class T>
46-
OutputVarType value_as_root(const T& _var) const {
46+
OutputVarType value_as_root([[maybe_unused]] const T& _var) const {
4747
static_assert(rfl::always_false_v<T>,
4848
"TOML only allows tables as the root element.");
4949
return OutputVarType{};

0 commit comments

Comments
 (0)