diff options
author | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-10 12:45:35 +0000 |
---|---|---|
committer | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-10 12:45:35 +0000 |
commit | a34cc0992e8735dbbec8447d24dbb5c31fc85700 (patch) | |
tree | 61ba63c84dad4f9f7b90be85c618c140640f282c /base/values.h | |
parent | 96bb7f65e415bf2c3aae0f6fc276b936503fbfd8 (diff) | |
download | chromium_src-a34cc0992e8735dbbec8447d24dbb5c31fc85700.zip chromium_src-a34cc0992e8735dbbec8447d24dbb5c31fc85700.tar.gz chromium_src-a34cc0992e8735dbbec8447d24dbb5c31fc85700.tar.bz2 |
Clean-up inline members of nested classes (base/)
Due to a bug, the Clang-plugin style checker failed to warn about
inline constructors, destructors, non-empty virtual methods, etc.
for nested classes.
The plugin has been fixed, and this patch is part of a clean-up of all
the code that now causes the plugin to issue errors.
BUG=139346
Review URL: https://chromiumcodereview.appspot.com/10825273
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151016 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/values.h')
-rw-r--r-- | base/values.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/base/values.h b/base/values.h index c583407..83d046c 100644 --- a/base/values.h +++ b/base/values.h @@ -339,10 +339,12 @@ class BASE_EXPORT DictionaryValue : public Value { // YOU SHOULD ALWAYS USE THE XXXWithoutPathExpansion() APIs WITH THESE, NOT // THE NORMAL XXX() APIs. This makes sure things will work correctly if any // keys have '.'s in them. - class key_iterator + class BASE_EXPORT key_iterator : private std::iterator<std::input_iterator_tag, const std::string> { public: - explicit key_iterator(ValueMap::const_iterator itr) { itr_ = itr; } + explicit key_iterator(ValueMap::const_iterator itr); + // Not explicit, because this is a copy constructor. + key_iterator(const key_iterator& rhs); key_iterator operator++() { ++itr_; return *this; @@ -360,10 +362,9 @@ class BASE_EXPORT DictionaryValue : public Value { // This class provides an iterator over both keys and values in the // dictionary. It can't be used to modify the dictionary. - class Iterator { + class BASE_EXPORT Iterator { public: - explicit Iterator(const DictionaryValue& target) - : target_(target), it_(target.dictionary_.begin()) {} + explicit Iterator(const DictionaryValue& target); bool HasNext() const { return it_ != target_.dictionary_.end(); } void Advance() { ++it_; } |