COMP: Corrected ambiguous construction from tmp errors

This commit is contained in:
Andrew Heather
2017-03-24 15:50:27 +00:00
parent bad27c45fc
commit 65a4a357b5
2 changed files with 17 additions and 11 deletions

View File

@ -986,11 +986,14 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
{
if (validField<scalar>(weightFieldName_))
{
scalarField weightField = getFieldValues<scalar>
scalarField weightField
(
weightFieldName_,
true,
orientWeightField_
getFieldValues<scalar>
(
weightFieldName_,
true,
orientWeightField_
)
);
// Process the fields
@ -998,11 +1001,14 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
}
else if (validField<vector>(weightFieldName_))
{
vectorField weightField = getFieldValues<vector>
vectorField weightField
(
weightFieldName_,
true,
orientWeightField_
getFieldValues<vector>
(
weightFieldName_,
true,
orientWeightField_
)
);
// Process the fields

View File

@ -191,7 +191,7 @@ processSameTypeValues
}
else
{
const scalarField factor = weightingFactor(weightField);
const scalarField factor(weightingFactor(weightField));
result = gSum(factor*values)/(gSum(factor) + ROOTVSMALL);
}
@ -206,7 +206,7 @@ processSameTypeValues
}
case opWeightedAreaAverage:
{
const scalarField factor = weightingFactor(weightField, Sf);
const scalarField factor(weightingFactor(weightField, Sf));
result = gSum(factor*values)/gSum(factor + ROOTVSMALL);
break;
@ -220,7 +220,7 @@ processSameTypeValues
}
case opWeightedAreaIntegrate:
{
const scalarField factor = weightingFactor(weightField, Sf);
const scalarField factor(weightingFactor(weightField, Sf));
result = gSum(factor*values);
break;