Internals: Remove extraneous castNode() calls. No functional change.

This commit is contained in:
Wilson Snyder
2016-11-05 10:06:43 -04:00
parent bda4b326ab
commit e52f5f1b63
9 changed files with 116 additions and 117 deletions
+2 -2
View File
@@ -390,8 +390,8 @@ private:
static AstNode* extendOrSel(FileLine* fl, AstNode* rhsp, AstNode* cmpWidthp) {
if (cmpWidthp->width() > rhsp->width()) {
rhsp = (rhsp->isSigned()
? (new AstExtendS(fl, rhsp))->castNode()
: (new AstExtend (fl, rhsp))->castNode());
? static_cast<AstNode*>(new AstExtendS(fl, rhsp))
: static_cast<AstNode*>(new AstExtend (fl, rhsp)));
rhsp->dtypeFrom(cmpWidthp); // Need proper widthMin, which may differ from AstSel created above
} else if (cmpWidthp->width() < rhsp->width()) {
rhsp = new AstSel (fl, rhsp, 0, cmpWidthp->width());