Bug 1387002 - Replace .size() by .empty() when applicable in dom/media/webspeech/ r=padenot
authorSylvestre Ledru <sledru@mozilla.com>
Thu, 03 Aug 2017 12:05:50 +0200
changeset 373913 bc8bca54da9e1ab83bb6be9ce40d1225977b7a9b
parent 373912 6a174665b5bc34d6d2d40917b3dac5f1d0bfa237
child 373914 acafa453e8a3d317c6f0d7d10f2fd5f09f01527c
push id48492
push usersledru@mozilla.com
push dateThu, 10 Aug 2017 20:23:46 +0000
treeherderautoland@054d2e90007e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1387002
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1387002 - Replace .size() by .empty() when applicable in dom/media/webspeech/ r=padenot MozReview-Commit-ID: 6gS9NBbn4wv
dom/media/webspeech/recognition/energy_endpointer.cc
--- a/dom/media/webspeech/recognition/energy_endpointer.cc
+++ b/dom/media/webspeech/recognition/energy_endpointer.cc
@@ -110,17 +110,17 @@ void EnergyEndpointer::HistoryRing::Inse
 int64_t EnergyEndpointer::HistoryRing::EndTime() const {
   int ind = insertion_index_ - 1;
   if (ind < 0)
     ind = decision_points_.size() - 1;
   return decision_points_[ind].time_us;
 }
 
 float EnergyEndpointer::HistoryRing::RingSum(float duration_sec) {
-  if (!decision_points_.size())
+  if (decision_points_.empty())
     return 0.0;
 
   int64_t sum_us = 0;
   int ind = insertion_index_ - 1;
   if (ind < 0)
     ind = decision_points_.size() - 1;
   int64_t end_us = decision_points_[ind].time_us;
   bool is_on = decision_points_[ind].decision;