Commit fddc211a by Arun Patole Committed by Olli Etuaho

Revert "Revert "Use nullptr consistently in TIntermConstantUnion::fold""

Revert of revert as the new changes that use nullptr in fold function are already in. This reverts commit b775778a. Change-Id: Ifbdb35264132c66e5d1f2379932839b99291c54a Reviewed-on: https://chromium-review.googlesource.com/266803Reviewed-by: 's avatarOlli Etuaho <oetuaho@nvidia.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
parent aed081ce
......@@ -657,7 +657,7 @@ TIntermTyped *TIntermConstantUnion::fold(
ConstantUnion *unionArray = getUnionArrayPointer();
if (!unionArray)
return NULL;
return nullptr;
size_t objectSize = getType().getObjectSize();
......@@ -669,7 +669,7 @@ TIntermTyped *TIntermConstantUnion::fold(
TType returnType = getType();
if (!rightUnionArray)
return NULL;
return nullptr;
// for a case like float f = 1.2 + vec4(2,3,4,5);
if (constantNode->getType().getObjectSize() == 1 && objectSize > 1)
......@@ -726,7 +726,7 @@ TIntermTyped *TIntermConstantUnion::fold(
infoSink.info.message(
EPrefixInternalError, getLine(),
"Constant Folding cannot be done for matrix multiply");
return NULL;
return nullptr;
}
const int leftCols = getCols();
......@@ -840,7 +840,7 @@ TIntermTyped *TIntermConstantUnion::fold(
infoSink.info.message(
EPrefixInternalError, getLine(),
"Constant folding cannot be done for \"/\"");
return NULL;
return nullptr;
}
}
}
......@@ -853,7 +853,7 @@ TIntermTyped *TIntermConstantUnion::fold(
infoSink.info.message(
EPrefixInternalError, getLine(),
"Constant Folding cannot be done for matrix times vector");
return NULL;
return nullptr;
}
const int matrixCols = getCols();
......@@ -889,7 +889,7 @@ TIntermTyped *TIntermConstantUnion::fold(
infoSink.info.message(
EPrefixInternalError, getLine(),
"Constant Folding cannot be done for vector times matrix");
return NULL;
return nullptr;
}
const int matrixCols = constantNode->getType().getCols();
......@@ -1098,7 +1098,7 @@ TIntermTyped *TIntermConstantUnion::fold(
infoSink.info.message(
EPrefixInternalError, getLine(),
"Invalid operator for constant folding");
return NULL;
return nullptr;
}
tempNode = new TIntermConstantUnion(tempConstArray, returnType);
tempNode->setLine(getLine());
......@@ -1133,7 +1133,7 @@ TIntermTyped *TIntermConstantUnion::fold(
infoSink.info.message(
EPrefixInternalError, getLine(),
"Unary operation not folded into constant");
return NULL;
return nullptr;
}
break;
......@@ -1154,7 +1154,7 @@ TIntermTyped *TIntermConstantUnion::fold(
infoSink.info.message(
EPrefixInternalError, getLine(),
"Unary operation not folded into constant");
return NULL;
return nullptr;
}
break;
......@@ -1170,7 +1170,7 @@ TIntermTyped *TIntermConstantUnion::fold(
infoSink.info.message(
EPrefixInternalError, getLine(),
"Unary operation not folded into constant");
return NULL;
return nullptr;
}
break;
......@@ -1187,7 +1187,7 @@ TIntermTyped *TIntermConstantUnion::fold(
infoSink.info.message(
EPrefixInternalError, getLine(),
"Unary operation not folded into constant");
return NULL;
return nullptr;
}
break;
......@@ -1386,7 +1386,7 @@ TIntermTyped *TIntermConstantUnion::fold(
return nullptr;
default:
return NULL;
return nullptr;
}
}
newNode = new TIntermConstantUnion(tempConstArray, getType());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment