Bug 1083373 part 3: Use string::size_type to iterate over a string, in ClearKeyUtils.cpp. r=edwin
authorDaniel Holbert <dholbert@cs.stanford.edu>
Mon, 27 Oct 2014 18:12:51 -0700
changeset 212584 2abc300df08c66f5541553437baa35d63bfa1cfe
parent 212583 c7e523e3d339410de77475c74a87c12ab53be880
child 212585 c5b93a000dfba4239004f5928c22896514b62cdf
push id27721
push usercbook@mozilla.com
push dateTue, 28 Oct 2014 14:55:05 +0000
treeherdermozilla-central@c0ddb1b098ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin
bugs1083373
milestone36.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 1083373 part 3: Use string::size_type to iterate over a string, in ClearKeyUtils.cpp. r=edwin
media/gmp-clearkey/0.1/ClearKeyUtils.cpp
--- a/media/gmp-clearkey/0.1/ClearKeyUtils.cpp
+++ b/media/gmp-clearkey/0.1/ClearKeyUtils.cpp
@@ -92,17 +92,17 @@ EncodeBase64Web(vector<uint8_t> aBinary,
   // Pad binary data in case there's rubbish past the last byte.
   aBinary.push_back(0);
 
   // Number of bytes not consumed in the previous character
   uint32_t shift = 0;
 
   auto out = aEncoded.begin();
   auto data = aBinary.begin();
-  for (int i = 0; i < aEncoded.length(); i++) {
+  for (string::size_type i = 0; i < aEncoded.length(); i++) {
     if (shift) {
       out[i] = (*data << (6 - shift)) & sMask;
       data++;
     } else {
       out[i] = 0;
     }
 
     out[i] += (*data >> (shift + 2)) & sMask;