diff options
author | scottmg <scottmg@chromium.org> | 2015-01-27 14:24:27 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-27 22:25:30 +0000 |
commit | 3bec0ffd9cfd92611182bc0f28e5dbc57f4cbaf1 (patch) | |
tree | ebf8645d969515b4e64912f4fc754ed79b25011a | |
parent | 862a31a017651edb3ef0edb04897538766d84089 (diff) | |
download | chromium_src-3bec0ffd9cfd92611182bc0f28e5dbc57f4cbaf1.zip chromium_src-3bec0ffd9cfd92611182bc0f28e5dbc57f4cbaf1.tar.gz chromium_src-3bec0ffd9cfd92611182bc0f28e5dbc57f4cbaf1.tar.bz2 |
Add missing .Pass() on return of SampleVector
On VS2015 without this causes:
d:\src\cr3\src\base\metrics\histogram.cc(372): error C2248: 'scoped_ptr<base::SampleVector,base::DefaultDeleter<T>>::scoped_ptr': cannot access private member declared in class 'scoped_ptr<base::SampleVector,base::DefaultDeleter<T>>'
with
[
T=base::SampleVector
]
d:\src\cr3\src\base\memory\scoped_ptr.h(312): note: see declaration of 'scoped_ptr<base::SampleVector,base::DefaultDeleter<T>>::scoped_ptr'
with
[
T=base::SampleVector
]
I'm not entirely sure why this doesn't happen on earlier compilers,
I guess something's move-ability changed.
R=isherman@chromium.org
BUG=440500
Review URL: https://codereview.chromium.org/882783002
Cr-Commit-Position: refs/heads/master@{#313378}
-rw-r--r-- | base/metrics/histogram.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/base/metrics/histogram.cc b/base/metrics/histogram.cc index 3b8ef86..42ced3d 100644 --- a/base/metrics/histogram.cc +++ b/base/metrics/histogram.cc @@ -369,7 +369,7 @@ HistogramBase* Histogram::DeserializeInfoImpl(PickleIterator* iter) { scoped_ptr<SampleVector> Histogram::SnapshotSampleVector() const { scoped_ptr<SampleVector> samples(new SampleVector(bucket_ranges())); samples->Add(*samples_); - return samples; + return samples.Pass(); } void Histogram::WriteAsciiImpl(bool graph_it, |