diff options
author | 2018-06-07 17:52:27 -0700 | |
---|---|---|
committer | 2018-06-07 17:54:21 -0700 | |
commit | fdd8da9e3f79be25b91293e22114c177c3b3fd8d (patch) | |
tree | cbc9fea00e9b67d631bde2bbb70de5b151dfcadc /libs/binder/BufferedTextOutput.cpp | |
parent | a160f5a70ffba3715c8a92f4f469922d59635356 (diff) |
[binder] Replace NULL/0 with nullptr
Fixes -Wzero-as-null-pointer-constant warning.
clang-tidy -checks=modernize-use-nullptr -p compile_commands.json -fix
...
Test: m
Bug: 68236239
Change-Id: I3181bc5683796423a98b0f9b94daf30880c07bdc
Merged-In: I3181bc5683796423a98b0f9b94daf30880c07bdc
(cherry picked from commit 91635563b8a1bf7a31e4ceb439728dacb79abd76)
Diffstat (limited to 'libs/binder/BufferedTextOutput.cpp')
-rw-r--r-- | libs/binder/BufferedTextOutput.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/binder/BufferedTextOutput.cpp b/libs/binder/BufferedTextOutput.cpp index 30e70b074e..0946aca876 100644 --- a/libs/binder/BufferedTextOutput.cpp +++ b/libs/binder/BufferedTextOutput.cpp @@ -36,7 +36,7 @@ struct BufferedTextOutput::BufferState : public RefBase { explicit BufferState(int32_t _seq) : seq(_seq) - , buffer(NULL) + , buffer(nullptr) , bufferPos(0) , bufferSize(0) , atFront(true) @@ -266,13 +266,13 @@ BufferedTextOutput::BufferState* BufferedTextOutput::getBuffer() const if ((mFlags&MULTITHREADED) != 0) { ThreadState* ts = getThreadState(); if (ts) { - while (ts->states.size() <= (size_t)mIndex) ts->states.add(NULL); + while (ts->states.size() <= (size_t)mIndex) ts->states.add(nullptr); BufferState* bs = ts->states[mIndex].get(); - if (bs != NULL && bs->seq == mSeq) return bs; + if (bs != nullptr && bs->seq == mSeq) return bs; ts->states.editItemAt(mIndex) = new BufferState(mIndex); bs = ts->states[mIndex].get(); - if (bs != NULL) return bs; + if (bs != nullptr) return bs; } } |