diff options
author | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-09 22:27:31 +0000 |
---|---|---|
committer | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-09 22:27:31 +0000 |
commit | 2a848e0e4d75cd9195d15ff955014397482f9faa (patch) | |
tree | c01833c6bbc8948df2f4e43983a69b8e38a4dc51 /net/disk_cache | |
parent | f5f12389d59defd2f4a8deb2db53fa13004f3e38 (diff) | |
download | chromium_src-2a848e0e4d75cd9195d15ff955014397482f9faa.zip chromium_src-2a848e0e4d75cd9195d15ff955014397482f9faa.tar.gz chromium_src-2a848e0e4d75cd9195d15ff955014397482f9faa.tar.bz2 |
Clean-up inline members of nested classes (net/)
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/10854063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150917 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-rw-r--r-- | net/disk_cache/rankings.cc | 9 | ||||
-rw-r--r-- | net/disk_cache/rankings.h | 7 |
2 files changed, 12 insertions, 4 deletions
diff --git a/net/disk_cache/rankings.cc b/net/disk_cache/rankings.cc index 6da1e1f..109a32a 100644 --- a/net/disk_cache/rankings.cc +++ b/net/disk_cache/rankings.cc @@ -189,6 +189,15 @@ void UpdateTimes(disk_cache::CacheRankingsBlock* node, bool modified) { namespace disk_cache { +Rankings::ScopedRankingsBlock::ScopedRankingsBlock() : rankings_(NULL) {} + +Rankings::ScopedRankingsBlock::ScopedRankingsBlock(Rankings* rankings) + : rankings_(rankings) {} + +Rankings::ScopedRankingsBlock::ScopedRankingsBlock( + Rankings* rankings, CacheRankingsBlock* node) + : scoped_ptr<CacheRankingsBlock>(node), rankings_(rankings) {} + Rankings::Iterator::Iterator(Rankings* rankings) { memset(this, 0, sizeof(Iterator)); my_rankings = rankings; diff --git a/net/disk_cache/rankings.h b/net/disk_cache/rankings.h index 703e8ae..94ab1fb 100644 --- a/net/disk_cache/rankings.h +++ b/net/disk_cache/rankings.h @@ -64,10 +64,9 @@ class Rankings { // iterators that may go stale. class ScopedRankingsBlock : public scoped_ptr<CacheRankingsBlock> { public: - ScopedRankingsBlock() : rankings_(NULL) {} - explicit ScopedRankingsBlock(Rankings* rankings) : rankings_(rankings) {} - ScopedRankingsBlock(Rankings* rankings, CacheRankingsBlock* node) - : scoped_ptr<CacheRankingsBlock>(node), rankings_(rankings) {} + ScopedRankingsBlock(); + explicit ScopedRankingsBlock(Rankings* rankings); + ScopedRankingsBlock(Rankings* rankings, CacheRankingsBlock* node); ~ScopedRankingsBlock() { rankings_->FreeRankingsBlock(get()); |