From a709af2861749e71a83b55260849dd77dcd37212 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 28 Jan 2014 01:22:23 +0000 Subject: [PATCH] s/0/nullptr/ llvm-svn: 200272 --- lld/include/lld/Core/File.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lld/include/lld/Core/File.h b/lld/include/lld/Core/File.h index 17eaec0fb29b..45dbbfef903f 100644 --- a/lld/include/lld/Core/File.h +++ b/lld/include/lld/Core/File.h @@ -165,13 +165,15 @@ protected: class atom_collection_vector : public atom_collection { public: virtual atom_iterator begin() const { - return atom_iterator(*this, - _atoms.empty() ? 0 : reinterpret_cast(_atoms.data())); + auto *it = _atoms.empty() ? nullptr + : reinterpret_cast(_atoms.data()); + return atom_iterator(*this, it); } virtual atom_iterator end() const{ - return atom_iterator(*this, _atoms.empty() ? 0 : - reinterpret_cast(_atoms.data() + _atoms.size())); + auto *it = _atoms.empty() ? nullptr : reinterpret_cast( + _atoms.data() + _atoms.size()); + return atom_iterator(*this, it); } virtual const T *deref(const void *it) const {