diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-04-21 16:50:40 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-04-22 12:44:27 -0700 |
commit | 2cebb24bfc3247d3e9be138a3350106737455918 (patch) | |
tree | d04d27d21b3c7733d784e303f01f873bb99e7770 /runtime/dex_method_iterator.h | |
parent | 1f02f1a7b3073b8fef07770a67fbf94afad317f0 (diff) | |
download | art-2cebb24bfc3247d3e9be138a3350106737455918.tar.gz art-2cebb24bfc3247d3e9be138a3350106737455918.tar.bz2 art-2cebb24bfc3247d3e9be138a3350106737455918.zip |
Replace NULL with nullptr
Also fixed some lines that were too long, and a few other minor
details.
Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
Diffstat (limited to 'runtime/dex_method_iterator.h')
-rw-r--r-- | runtime/dex_method_iterator.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/runtime/dex_method_iterator.h b/runtime/dex_method_iterator.h index 14e316f2a5..7fae277c14 100644 --- a/runtime/dex_method_iterator.h +++ b/runtime/dex_method_iterator.h @@ -30,8 +30,8 @@ class DexMethodIterator { found_next_(false), dex_file_index_(0), class_def_index_(0), - class_def_(NULL), - class_data_(NULL), + class_def_(nullptr), + class_data_(nullptr), direct_method_(false) { CHECK_NE(0U, dex_files_.size()); } @@ -51,20 +51,20 @@ class DexMethodIterator { dex_file_index_++; continue; } - if (class_def_ == NULL) { + if (class_def_ == nullptr) { class_def_ = &GetDexFileInternal().GetClassDef(class_def_index_); } - if (class_data_ == NULL) { + if (class_data_ == nullptr) { class_data_ = GetDexFileInternal().GetClassData(*class_def_); - if (class_data_ == NULL) { + if (class_data_ == nullptr) { // empty class, such as a marker interface // End of this class, advance and retry. - class_def_ = NULL; + class_def_ = nullptr; class_def_index_++; continue; } } - if (it_.get() == NULL) { + if (it_.get() == nullptr) { it_.reset(new ClassDataItemIterator(GetDexFileInternal(), class_data_)); // Skip fields while (GetIterator().HasNextStaticField()) { @@ -88,16 +88,16 @@ class DexMethodIterator { } // End of this class, advance and retry. DCHECK(!GetIterator().HasNext()); - it_.reset(NULL); - class_data_ = NULL; - class_def_ = NULL; + it_.reset(nullptr); + class_data_ = nullptr; + class_def_ = nullptr; class_def_index_++; } } void Next() { found_next_ = false; - if (it_.get() != NULL) { + if (it_.get() != nullptr) { // Advance to next method if we currently are looking at a class. GetIterator().Next(); } @@ -115,20 +115,20 @@ class DexMethodIterator { InvokeType GetInvokeType() { CHECK(HasNext()); - CHECK(class_def_ != NULL); + CHECK(class_def_ != nullptr); return GetIterator().GetMethodInvokeType(*class_def_); } private: ClassDataItemIterator& GetIterator() const { - CHECK(it_.get() != NULL); + CHECK(it_.get() != nullptr); return *it_.get(); } const DexFile& GetDexFileInternal() const { CHECK_LT(dex_file_index_, dex_files_.size()); const DexFile* dex_file = dex_files_[dex_file_index_]; - CHECK(dex_file != NULL); + CHECK(dex_file != nullptr); return *dex_file; } |