diff options
author | Alex Vakulenko <avakulenko@chromium.org> | 2014-08-28 16:48:57 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-09-01 11:05:16 +0000 |
commit | 88b591f24cb3f94f982d7024c2e8ed25c2cc26a2 (patch) | |
tree | d49741d0b0926c4c387e9d618b990ae89e6d2f8e /action_processor.h | |
parent | f3e2801f18bae14e41099e007de7c9a019735556 (diff) |
update_engine: Replace NULL with nullptr
Replaced the usage of NULL with nullptr. This also makes it possible to
use standard gtest macros to compare pointers in Update Manager's unit tests.
So, there is no need in custom UMTEST_... macros which are replaced with the
gtest macros (see change in update_engine/update_manager/umtest_utils.h):
UMTEST_ASSERT_NULL(p) => ASSERT_EQ(nullptr, p)
UMTEST_ASSERT_NOT_NULL(p) => ASSERT_NE(nullptr, p)
UMTEST_EXPECT_NULL(p) => EXPECT_EQ(nullptr, p)
UMTEST_EXPECT_NOT_NULL(p) => EXPECT_NE(nullptr, p)
BUG=None
TEST=FEATURES=test emerge-link update_engine
USE="clang asan" FEATURES=test emerge-link update_engine
Change-Id: I77a42a1e9ce992bb2f9f263db5cf75fe6110a4ec
Reviewed-on: https://chromium-review.googlesource.com/215136
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Diffstat (limited to 'action_processor.h')
-rw-r--r-- | action_processor.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/action_processor.h b/action_processor.h index adc47815..cb1aeb22 100644 --- a/action_processor.h +++ b/action_processor.h @@ -43,12 +43,12 @@ class ActionProcessor { void StopProcessing(); // Returns true iff an Action is currently processing. - bool IsRunning() const { return NULL != current_action_; } + bool IsRunning() const { return nullptr != current_action_; } // Adds another Action to the end of the queue. virtual void EnqueueAction(AbstractAction* action); - // Sets/gets the current delegate. Set to NULL to remove a delegate. + // Sets/gets the current delegate. Set to null to remove a delegate. ActionProcessorDelegate* delegate() const { return delegate_; } void set_delegate(ActionProcessorDelegate *delegate) { delegate_ = delegate; @@ -70,7 +70,7 @@ class ActionProcessor { // A pointer to the currently processing Action, if any. AbstractAction* current_action_; - // A pointer to the delegate, or NULL if none. + // A pointer to the delegate, or null if none. ActionProcessorDelegate *delegate_; DISALLOW_COPY_AND_ASSIGN(ActionProcessor); }; |