mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-14 15:56:38 +03:00
Only allow one statement per line.
With the new style rule, we cannot have two statements on the same line. So we can no longer have an "if" on a single line and we cannot have an arrow function with a body on the same line as when it is used. This is mostly a manual change. Change-Id: I2285202dd5ecbad764308bc725e6d317ff2ee7f0
This commit is contained in:
@@ -98,7 +98,9 @@ shaka.util.Uint8ArrayUtils.toHex = function(arr) {
|
||||
let hex = '';
|
||||
for (let i = 0; i < arr.length; ++i) {
|
||||
let value = arr[i].toString(16);
|
||||
if (value.length == 1) value = '0' + value;
|
||||
if (value.length == 1) {
|
||||
value = '0' + value;
|
||||
}
|
||||
hex += value;
|
||||
}
|
||||
return hex;
|
||||
@@ -113,11 +115,19 @@ shaka.util.Uint8ArrayUtils.toHex = function(arr) {
|
||||
* @export
|
||||
*/
|
||||
shaka.util.Uint8ArrayUtils.equal = function(arr1, arr2) {
|
||||
if (!arr1 && !arr2) return true;
|
||||
if (!arr1 || !arr2) return false;
|
||||
if (arr1.length != arr2.length) return false;
|
||||
if (!arr1 && !arr2) {
|
||||
return true;
|
||||
}
|
||||
if (!arr1 || !arr2) {
|
||||
return false;
|
||||
}
|
||||
if (arr1.length != arr2.length) {
|
||||
return false;
|
||||
}
|
||||
for (let i = 0; i < arr1.length; ++i) {
|
||||
if (arr1[i] != arr2[i]) return false;
|
||||
if (arr1[i] != arr2[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user