Skip to content

Commit

Permalink
Use reference for iterating histogram Bins
Browse files Browse the repository at this point in the history
* unique_ptr doesn't allow copying its pointer to outside. It causes
compilation failure of CV.

Change-Id: I4d5335d486cc82558a60a103ee93540685b23dd6
Reviewed-on: http://review.couchbase.org/75099
Reviewed-by: Sundararaman Sridharan <sundar@couchbase.com>
Tested-by: Jung-Sang Ahn <jungsang.ahn@gmail.com>
  • Loading branch information
greensky00 committed Mar 15, 2017
1 parent 8b80f88 commit 37ddc1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/filemgr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4066,7 +4066,7 @@ void LatencyStats::getHistogram(FileMgr *file,
}
std::stringstream ss;
ss << "{";
for (auto it : file->histStats[type]) {
for (auto& it : file->histStats[type]) {
if (it->count()) {
ss << "(" << it->start() << "µs - " << it->end() << "µs) : ";
ss << it->count() << "; ";
Expand Down

0 comments on commit 37ddc1f

Please sign in to comment.