Skip to content

Commit 35eca06

Browse files
authored
Merge pull request phaserjs#3025 from alexrford/lgtm-fixes
Lgtm fixes
2 parents 8b630c6 + 58751d5 commit 35eca06

9 files changed

Lines changed: 8 additions & 12 deletions

File tree

v3/src/gameobjects/mesh/Mesh.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ var Mesh = new Class({
4040
throw new Error('Phaser: Vertex count must match UV count');
4141
}
4242

43-
if (colors.length > 0 && colors.length < (vertices.length / 2)|0)
43+
if (colors.length > 0 && colors.length < ((vertices.length / 2)|0))
4444
{
4545
throw new Error('Phaser: Color count must match Vertex count');
4646
}
4747

48-
if (alphas.length > 0 && alphas.length < (vertices.length / 2)|0)
48+
if (alphas.length > 0 && alphas.length < ((vertices.length / 2)|0))
4949
{
5050
throw new Error('Phaser: Alpha count must match Vertex count');
5151
}

v3/src/loader/filetypes/HTMLFile.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ HTMLFile.prototype.onProcess = function (callback)
5151
data.push('</svg>');
5252

5353
var svg = [ data.join('\n') ];
54+
var _this = this;
5455

5556
try
5657
{
@@ -69,8 +70,6 @@ HTMLFile.prototype.onProcess = function (callback)
6970

7071
this.data.crossOrigin = this.crossOrigin;
7172

72-
var _this = this;
73-
7473
this.data.onload = function ()
7574
{
7675
URL.revokeObjectURL(_this.data.src);

v3/src/loader/filetypes/SVGFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ SVGFile.prototype.onProcess = function (callback)
3131
this.state = CONST.FILE_PROCESSING;
3232

3333
var svg = [ this.xhrLoader.responseText ];
34+
var _this = this;
3435

3536
try
3637
{
@@ -49,7 +50,6 @@ SVGFile.prototype.onProcess = function (callback)
4950

5051
this.data.crossOrigin = this.crossOrigin;
5152

52-
var _this = this;
5353
var retry = false;
5454

5555
this.data.onload = function ()

v3/src/math/random-data-generator/RandomDataGenerator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ RandomDataGenerator.prototype = {
234234
var a = '';
235235
var b = '';
236236

237-
for (b = a = ''; a++ < 36; b +=~a % 5 | a * 3&4 ? (a^15 ? 8^this.frac() * (a^20 ? 16 : 4) : 4).toString(16) : '-')
237+
for (b = a = ''; a++ < 36; b +=~a % 5 | a*3 & 4 ? (a^15 ? 8 ^ this.frac()*(a^20 ? 16 : 4) : 4).toString(16) : '-')
238238
{
239239
}
240240

v3/src/renderer/webgl/renderers/effectrenderer/EffectRenderer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ EffectRenderer.prototype = {
167167
renderEffect: function (gameObject, camera, texture, textureWidth, textureHeight)
168168
{
169169
var tempMatrix = this.tempMatrix;
170-
var alpha = 16777216;
171170
var vertexDataBuffer = this.vertexDataBuffer;
172171
var vertexBufferObjectF32 = vertexDataBuffer.floatView;
173172
var vertexBufferObjectU32 = vertexDataBuffer.uintView;

v3/src/renderer/webgl/renderers/spritebatch/SpriteBatch.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ SpriteBatch.prototype = {
435435
addSpriteTexture: function (gameObject, camera, texture, textureWidth, textureHeight)
436436
{
437437
var tempMatrix = this.tempMatrix;
438-
var alpha = 16777216;
439438
var vertexDataBuffer = this.vertexDataBuffer;
440439
var vertexBufferObjectF32 = vertexDataBuffer.floatView;
441440
var vertexBufferObjectU32 = vertexDataBuffer.uintView;
@@ -528,7 +527,6 @@ SpriteBatch.prototype = {
528527
{
529528
var tempMatrix = this.tempMatrix;
530529
var frame = gameObject.frame;
531-
var alpha = 16777216;
532530
var forceFlipY = (frame.texture.source[frame.sourceIndex].glTexture.isRenderTexture ? true : false);
533531
var flipX = gameObject.flipX;
534532
var flipY = gameObject.flipY ^ forceFlipY;

v3/src/utils/array/matrix/Rotate180.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var RotateMatrix = require('./RotateMatrix)';
1+
var RotateMatrix = require('./RotateMatrix');
22

33
var Rotate180 = function (matrix)
44
{

v3/src/utils/array/matrix/RotateLeft.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var RotateMatrix = require('./RotateMatrix)';
1+
var RotateMatrix = require('./RotateMatrix');
22

33
var RotateLeft = function (matrix)
44
{

v3/src/utils/array/matrix/RotateRight.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var RotateMatrix = require('./RotateMatrix)';
1+
var RotateMatrix = require('./RotateMatrix');
22

33
var RotateRight = function (matrix)
44
{

0 commit comments

Comments
 (0)