mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
[C++] Use 'nullptr'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207394 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -86,14 +86,14 @@ class EquivalenceClasses {
|
||||
}
|
||||
|
||||
void setNext(const ECValue *NewNext) const {
|
||||
assert(getNext() == 0 && "Already has a next pointer!");
|
||||
assert(getNext() == nullptr && "Already has a next pointer!");
|
||||
Next = (const ECValue*)((intptr_t)NewNext | (intptr_t)isLeader());
|
||||
}
|
||||
public:
|
||||
ECValue(const ECValue &RHS) : Leader(this), Next((ECValue*)(intptr_t)1),
|
||||
Data(RHS.Data) {
|
||||
// Only support copying of singleton nodes.
|
||||
assert(RHS.isLeader() && RHS.getNext() == 0 && "Not a singleton!");
|
||||
assert(RHS.isLeader() && RHS.getNext() == nullptr && "Not a singleton!");
|
||||
}
|
||||
|
||||
bool operator<(const ECValue &UFN) const { return Data < UFN.Data; }
|
||||
@@ -251,13 +251,13 @@ public:
|
||||
explicit member_iterator(const ECValue *N) : Node(N) {}
|
||||
|
||||
reference operator*() const {
|
||||
assert(Node != 0 && "Dereferencing end()!");
|
||||
assert(Node != nullptr && "Dereferencing end()!");
|
||||
return Node->getData();
|
||||
}
|
||||
reference operator->() const { return operator*(); }
|
||||
|
||||
member_iterator &operator++() {
|
||||
assert(Node != 0 && "++'d off the end of the list!");
|
||||
assert(Node != nullptr && "++'d off the end of the list!");
|
||||
Node = Node->getNext();
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user