NULL -> nullptr
authorNicholas Ormrod <njormrod@fb.com>
Wed, 26 Mar 2014 09:33:48 +0000 (02:33 -0700)
committerDave Watson <davejwatson@fb.com>
Mon, 31 Mar 2014 17:44:51 +0000 (10:44 -0700)
commit52fceaf485e63d459d2df5858ffdbeaafe851dbf
tree1a03a3b08f444323aacf02832fba3e62f5fab8b2
parent7154531b595a12505fdc50c536f68d6eaf6b84cf
NULL -> nullptr

Summary:
Change NULLs to nullptrs.

Facebook:
I was tired of seeing lint errors for NULL -> nullptr, so I
fixed it.

How: modified flint's tokenizer to output lines of the form

sed -i '__LINE__s|\<NULL\>|nullptr|g' __FILE__

for each NULL token encountered.

Ran the sed lines, restricted to filepaths with extensions
h,hpp,cc,cpp,tcc. Did not apply to FacebookUpdate, due to weird
formatting; hphp, to be done in a separate diff; payment, due to a large
number of generated text which didn't play well with my flow; and
memcache, which has lots of .h's that cannot contain nullptr's because
they are included from .c's.

@bypass-lint

Test Plan:
fbconfig -r common folly && fbmake opt && fbmake runtests_opt
^ of the 4k+ test cases, about two dozen are failing. Slightly more
failed in master than with my diff applied.

arc unit

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D1234261
21 files changed:
folly/Benchmark.cpp
folly/ConcurrentSkipList.h
folly/FBString.h
folly/FBVector.h
folly/Malloc.cpp
folly/Malloc.h
folly/Random.cpp
folly/SmallLocks.h
folly/Synchronized.h
folly/ThreadCachedInt.h
folly/detail/ThreadLocalDetail.h
folly/io/IOBuf.cpp
folly/io/test/IOBufQueueTest.cpp
folly/small_vector.h
folly/stats/Histogram.h
folly/test/AtomicHashMapTest.cpp
folly/test/ConcurrentSkipListTest.cpp
folly/test/ConvTest.cpp
folly/test/DiscriminatedPtrTest.cpp
folly/test/ThreadLocalTest.cpp
folly/test/stl_tests/OFBVector.h