mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
suppress unused lambda capture warnings with clang
This commit is contained in:
parent
adfe80cba0
commit
fffb3d9f0e
@ -887,6 +887,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>) {
|
||||||
|
static_cast<void>(this); // suppress clang warning
|
||||||
return getValue(value);
|
return getValue(value);
|
||||||
} else {
|
} else {
|
||||||
return this->extendEval(value);
|
return this->extendEval(value);
|
||||||
@ -989,7 +990,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
|
static_cast<void>(this); // suppress clang warning
|
||||||
return getValue(value);
|
return getValue(value);
|
||||||
} else {
|
} else {
|
||||||
return this->extendEval(value);
|
return this->extendEval(value);
|
||||||
|
@ -129,6 +129,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>) {
|
||||||
|
static_cast<void>(this); // suppress clang warning
|
||||||
return getValue(value);
|
return getValue(value);
|
||||||
} else {
|
} else {
|
||||||
return this->extendEval(value);
|
return this->extendEval(value);
|
||||||
@ -145,6 +146,7 @@ namespace Opm
|
|||||||
auto zeroElem = [this]()
|
auto zeroElem = [this]()
|
||||||
{
|
{
|
||||||
if constexpr (std::is_same_v<Value, Scalar>) {
|
if constexpr (std::is_same_v<Value, Scalar>) {
|
||||||
|
static_cast<void>(this); // suppress clang warning
|
||||||
return 0.0;
|
return 0.0;
|
||||||
} else {
|
} else {
|
||||||
return Value{this->primary_variables_.numWellEq() + Indices::numEq, 0.0};
|
return Value{this->primary_variables_.numWellEq() + Indices::numEq, 0.0};
|
||||||
@ -579,7 +581,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
|
static_cast<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