[lld] r200272 - s/0/nullptr/

Rui Ueyama ruiu at google.com
Mon Jan 27 17:22:23 PST 2014


Author: ruiu
Date: Mon Jan 27 19:22:23 2014
New Revision: 200272

URL: http://llvm.org/viewvc/llvm-project?rev=200272&view=rev
Log:
s/0/nullptr/

Modified:
    lld/trunk/include/lld/Core/File.h

Modified: lld/trunk/include/lld/Core/File.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/File.h?rev=200272&r1=200271&r2=200272&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/File.h (original)
+++ lld/trunk/include/lld/Core/File.h Mon Jan 27 19:22:23 2014
@@ -165,13 +165,15 @@ protected:
   class atom_collection_vector : public atom_collection<T> {
   public:
     virtual atom_iterator<T> begin() const {
-      return atom_iterator<T>(*this,
-          _atoms.empty() ? 0 : reinterpret_cast<const void *>(_atoms.data()));
+      auto *it = _atoms.empty() ? nullptr
+                                : reinterpret_cast<const void *>(_atoms.data());
+      return atom_iterator<T>(*this, it);
     }
 
     virtual atom_iterator<T> end() const{
-      return atom_iterator<T>(*this, _atoms.empty() ? 0 :
-          reinterpret_cast<const void *>(_atoms.data() + _atoms.size()));
+      auto *it = _atoms.empty() ? nullptr : reinterpret_cast<const void *>(
+                                                _atoms.data() + _atoms.size());
+      return atom_iterator<T>(*this, it);
     }
 
     virtual const T *deref(const void *it) const {





More information about the llvm-commits mailing list