mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
[C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205831 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -49,7 +49,7 @@ namespace llvm {
|
||||
/// @{
|
||||
|
||||
/// Construct an empty ArrayRef.
|
||||
/*implicit*/ ArrayRef() : Data(0), Length(0) {}
|
||||
/*implicit*/ ArrayRef() : Data(nullptr), Length(0) {}
|
||||
|
||||
/// Construct an empty ArrayRef from None.
|
||||
/*implicit*/ ArrayRef(NoneType) : Data(nullptr), Length(0) {}
|
||||
|
@@ -985,7 +985,7 @@ public:
|
||||
private:
|
||||
pointer Ptr, End;
|
||||
public:
|
||||
DenseMapIterator() : Ptr(0), End(0) {}
|
||||
DenseMapIterator() : Ptr(nullptr), End(nullptr) {}
|
||||
|
||||
DenseMapIterator(pointer Pos, pointer E, bool NoAdvance = false)
|
||||
: Ptr(Pos), End(E) {
|
||||
|
@@ -494,9 +494,9 @@ private:
|
||||
// Note: we have to be careful about the case when we move the first node
|
||||
// in the list. This node is the list sentinel node and we can't move it.
|
||||
NodeTy *ThisSentinel = getTail();
|
||||
setTail(0);
|
||||
setTail(nullptr);
|
||||
NodeTy *L2Sentinel = L2.getTail();
|
||||
L2.setTail(0);
|
||||
L2.setTail(nullptr);
|
||||
|
||||
// Remove [first, last) from its old position.
|
||||
NodeTy *First = &*first, *Prev = this->getPrev(First);
|
||||
@@ -537,7 +537,7 @@ public:
|
||||
//
|
||||
|
||||
size_type LLVM_ATTRIBUTE_UNUSED_RESULT size() const {
|
||||
if (Head == 0) return 0; // Don't require construction of sentinel if empty.
|
||||
if (!Head) return 0; // Don't require construction of sentinel if empty.
|
||||
return std::distance(begin(), end());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user