Use nullptr where possible instead of NULL or 0
This commit is contained in:
parent
728c689574
commit
a7603c132d
38 changed files with 248 additions and 248 deletions
|
|
@ -1086,31 +1086,31 @@ public:
|
|||
virtual const glslang::TSourceLoc& getLoc() const { return loc; }
|
||||
virtual void setLoc(const glslang::TSourceLoc& l) { loc = l; }
|
||||
virtual void traverse(glslang::TIntermTraverser*) = 0;
|
||||
virtual glslang::TIntermTyped* getAsTyped() { return 0; }
|
||||
virtual glslang::TIntermOperator* getAsOperator() { return 0; }
|
||||
virtual glslang::TIntermConstantUnion* getAsConstantUnion() { return 0; }
|
||||
virtual glslang::TIntermAggregate* getAsAggregate() { return 0; }
|
||||
virtual glslang::TIntermUnary* getAsUnaryNode() { return 0; }
|
||||
virtual glslang::TIntermBinary* getAsBinaryNode() { return 0; }
|
||||
virtual glslang::TIntermSelection* getAsSelectionNode() { return 0; }
|
||||
virtual glslang::TIntermSwitch* getAsSwitchNode() { return 0; }
|
||||
virtual glslang::TIntermMethod* getAsMethodNode() { return 0; }
|
||||
virtual glslang::TIntermSymbol* getAsSymbolNode() { return 0; }
|
||||
virtual glslang::TIntermBranch* getAsBranchNode() { return 0; }
|
||||
virtual glslang::TIntermLoop* getAsLoopNode() { return 0; }
|
||||
virtual glslang::TIntermTyped* getAsTyped() { return nullptr; }
|
||||
virtual glslang::TIntermOperator* getAsOperator() { return nullptr; }
|
||||
virtual glslang::TIntermConstantUnion* getAsConstantUnion() { return nullptr; }
|
||||
virtual glslang::TIntermAggregate* getAsAggregate() { return nullptr; }
|
||||
virtual glslang::TIntermUnary* getAsUnaryNode() { return nullptr; }
|
||||
virtual glslang::TIntermBinary* getAsBinaryNode() { return nullptr; }
|
||||
virtual glslang::TIntermSelection* getAsSelectionNode() { return nullptr; }
|
||||
virtual glslang::TIntermSwitch* getAsSwitchNode() { return nullptr; }
|
||||
virtual glslang::TIntermMethod* getAsMethodNode() { return nullptr; }
|
||||
virtual glslang::TIntermSymbol* getAsSymbolNode() { return nullptr; }
|
||||
virtual glslang::TIntermBranch* getAsBranchNode() { return nullptr; }
|
||||
virtual glslang::TIntermLoop* getAsLoopNode() { return nullptr; }
|
||||
|
||||
virtual const glslang::TIntermTyped* getAsTyped() const { return 0; }
|
||||
virtual const glslang::TIntermOperator* getAsOperator() const { return 0; }
|
||||
virtual const glslang::TIntermConstantUnion* getAsConstantUnion() const { return 0; }
|
||||
virtual const glslang::TIntermAggregate* getAsAggregate() const { return 0; }
|
||||
virtual const glslang::TIntermUnary* getAsUnaryNode() const { return 0; }
|
||||
virtual const glslang::TIntermBinary* getAsBinaryNode() const { return 0; }
|
||||
virtual const glslang::TIntermSelection* getAsSelectionNode() const { return 0; }
|
||||
virtual const glslang::TIntermSwitch* getAsSwitchNode() const { return 0; }
|
||||
virtual const glslang::TIntermMethod* getAsMethodNode() const { return 0; }
|
||||
virtual const glslang::TIntermSymbol* getAsSymbolNode() const { return 0; }
|
||||
virtual const glslang::TIntermBranch* getAsBranchNode() const { return 0; }
|
||||
virtual const glslang::TIntermLoop* getAsLoopNode() const { return 0; }
|
||||
virtual const glslang::TIntermTyped* getAsTyped() const { return nullptr; }
|
||||
virtual const glslang::TIntermOperator* getAsOperator() const { return nullptr; }
|
||||
virtual const glslang::TIntermConstantUnion* getAsConstantUnion() const { return nullptr; }
|
||||
virtual const glslang::TIntermAggregate* getAsAggregate() const { return nullptr; }
|
||||
virtual const glslang::TIntermUnary* getAsUnaryNode() const { return nullptr; }
|
||||
virtual const glslang::TIntermBinary* getAsBinaryNode() const { return nullptr; }
|
||||
virtual const glslang::TIntermSelection* getAsSelectionNode() const { return nullptr; }
|
||||
virtual const glslang::TIntermSwitch* getAsSwitchNode() const { return nullptr; }
|
||||
virtual const glslang::TIntermMethod* getAsMethodNode() const { return nullptr; }
|
||||
virtual const glslang::TIntermSymbol* getAsSymbolNode() const { return nullptr; }
|
||||
virtual const glslang::TIntermBranch* getAsBranchNode() const { return nullptr; }
|
||||
virtual const glslang::TIntermLoop* getAsLoopNode() const { return nullptr; }
|
||||
virtual ~TIntermNode() { }
|
||||
|
||||
protected:
|
||||
|
|
@ -1616,8 +1616,8 @@ protected:
|
|||
//
|
||||
class TIntermUnary : public TIntermOperator {
|
||||
public:
|
||||
TIntermUnary(TOperator o, TType& t) : TIntermOperator(o, t), operand(0) {}
|
||||
TIntermUnary(TOperator o) : TIntermOperator(o), operand(0) {}
|
||||
TIntermUnary(TOperator o, TType& t) : TIntermOperator(o, t), operand(nullptr) {}
|
||||
TIntermUnary(TOperator o) : TIntermOperator(o), operand(nullptr) {}
|
||||
virtual void traverse(TIntermTraverser*);
|
||||
virtual void setOperand(TIntermTyped* o) { operand = o; }
|
||||
virtual TIntermTyped* getOperand() { return operand; }
|
||||
|
|
@ -1819,7 +1819,7 @@ public:
|
|||
|
||||
TIntermNode *getParentNode()
|
||||
{
|
||||
return path.size() == 0 ? NULL : path.back();
|
||||
return path.size() == 0 ? nullptr : path.back();
|
||||
}
|
||||
|
||||
const bool preVisit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue