Skip to content

Commit 3e3edea

Browse files
committed
Unused attribute instead of void cast
1 parent d2e0cf3 commit 3e3edea

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

dev/values_to_tuple.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ namespace sqlite_orm::internal {
1313

1414
template<class Tpl>
1515
struct tuple_from_values {
16-
SQLITE_ORM_STATIC_CALLOP Tpl operator()(sqlite3_value** values, int nValues) SQLITE_ORM_OR_CONST_CALLOP {
16+
SQLITE_ORM_STATIC_CALLOP Tpl operator()(sqlite3_value** values,
17+
[[maybe_unused]] int nValues) SQLITE_ORM_OR_CONST_CALLOP {
1718
#ifdef SQLITE_ORM_CONTRACTS_SUPPORTED
1819
contract_assert(nValues == std::tuple_size<Tpl>::value);
19-
#else
20-
(void)nValues;
2120
#endif
2221
return tuple_from_values::create_from(values, std::make_index_sequence<std::tuple_size<Tpl>::value>{});
2322
}

include/sqlite_orm/sqlite_orm.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17858,11 +17858,10 @@ namespace sqlite_orm::internal {
1785817858

1785917859
template<class Tpl>
1786017860
struct tuple_from_values {
17861-
SQLITE_ORM_STATIC_CALLOP Tpl operator()(sqlite3_value** values, int nValues) SQLITE_ORM_OR_CONST_CALLOP {
17861+
SQLITE_ORM_STATIC_CALLOP Tpl operator()(sqlite3_value** values,
17862+
[[maybe_unused]] int nValues) SQLITE_ORM_OR_CONST_CALLOP {
1786217863
#ifdef SQLITE_ORM_CONTRACTS_SUPPORTED
1786317864
contract_assert(nValues == std::tuple_size<Tpl>::value);
17864-
#else
17865-
(void)nValues;
1786617865
#endif
1786717866
return tuple_from_values::create_from(values, std::make_index_sequence<std::tuple_size<Tpl>::value>{});
1786817867
}

0 commit comments

Comments
 (0)