mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
supress unused capture warning with clang
a bug in clang causes it to emit unused lambda captures here due to the if constexpr usage. use standard (void) trick to suppress it
This commit is contained in:
parent
3ca1102d6f
commit
127ddd44a2
@ -1078,6 +1078,7 @@ namespace Opm
|
|||||||
auto obtain = [this](const Eval& value)
|
auto obtain = [this](const Eval& value)
|
||||||
{
|
{
|
||||||
if constexpr (std::is_same_v<Value, Scalar>) {
|
if constexpr (std::is_same_v<Value, Scalar>) {
|
||||||
|
(void)this; // suppress clang warning
|
||||||
return getValue(value);
|
return getValue(value);
|
||||||
} else {
|
} else {
|
||||||
return this->extendEval(value);
|
return this->extendEval(value);
|
||||||
|
@ -869,6 +869,7 @@ namespace Opm
|
|||||||
auto obtain = [this](const Eval& value)
|
auto obtain = [this](const Eval& value)
|
||||||
{
|
{
|
||||||
if constexpr (std::is_same_v<Value, Scalar>) {
|
if constexpr (std::is_same_v<Value, Scalar>) {
|
||||||
|
(void)this; // suppress clang warning
|
||||||
return getValue(value);
|
return getValue(value);
|
||||||
} else {
|
} else {
|
||||||
return this->extendEval(value);
|
return this->extendEval(value);
|
||||||
|
Loading…
Reference in New Issue
Block a user