Permalink
Browse files

Disable plusplus in JSLint, and fix remaining warnings.

  • Loading branch information...
1 parent b464e5c commit f3877eb609889cd9476e362573902a219472c855 @stephank committed Jun 6, 2010
Showing with 8 additions and 8 deletions.
  1. +7 −7 src/grid.js
  2. +1 −1 util/lint.head.js
View
14 src/grid.js
@@ -82,10 +82,10 @@ Grid.prototype.draw = function() {
// Pretty simply, this 'pulls stuff away' from the point of convergence.
var frontDepthFactor = C.startDepth / (C.startDepth + this.distance),
backDepthFactor = C.startDepth / (C.endDepth + this.distance),
- scoords = [], i;
+ scoords = [], i, corner;
scoords[this.coords.length - 1] = null; // initialize array size
for (i = 0; i < this.coords.length; i++) {
- var corner = this.coords[i];
+ corner = this.coords[i];
scoords[i] = {
sx: (corner[0] - this.twist[0]) * frontDepthFactor,
sy: (corner[1] - this.twist[1]) * frontDepthFactor,
@@ -116,11 +116,11 @@ Grid.prototype.draw = function() {
c.beginPath();
c.moveTo(scoords[0].sx, scoords[0].sy);
for (i = 1; i < scoords.length; i++) {
- var corner = scoords[i];
+ corner = scoords[i];
c.lineTo(corner.sx, corner.sy);
}
for (i -= 1; i >= 0; i -= 1) {
- var corner = scoords[i];
+ corner = scoords[i];
c.lineTo(corner.ex, corner.ey);
}
c.closePath();
@@ -132,21 +132,21 @@ Grid.prototype.draw = function() {
c.beginPath();
// Draw lanes
for (i = 0; i < scoords.length; i++) {
- var corner = scoords[i];
+ corner = scoords[i];
c.moveTo(corner.sx, corner.sy);
c.lineTo(corner.ex, corner.ey);
}
// Draw front edge
c.moveTo(scoords[0].sx, scoords[0].sy);
for (i = 1; i < scoords.length; i++) {
- var corner = scoords[i];
+ corner = scoords[i];
if (corner.close) { c.closePath(); break; }
c.lineTo(corner.sx, corner.sy);
}
// Draw back edge
c.moveTo(scoords[0].ex, scoords[0].ey);
for (i = 1; i < scoords.length; i++) {
- var corner = scoords[i];
+ corner = scoords[i];
if (corner.close) { c.closePath(); break; }
c.lineTo(corner.ex, corner.ey);
}
View
2 util/lint.head.js
@@ -1,3 +1,3 @@
-/*jslint white: false, onevar: false, browser: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, regexp: true, strict: true, newcap: true, immed: true */
+/*jslint white: false, onevar: false, browser: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, regexp: true, strict: true, newcap: true, immed: true, plusplus: false */
"use strict";
/*global $: false, Audio: false, Constants: true, C: true, Elements: true, Engine: true, frame: true, c: true, Snd: true, Rand: true, Starfield: true, Dig7Segment: true, SizzlingLine: true, Lightning: true, ArashiLogo: true, Grids: true, TestMachine: true, TitleMachine: true, GameMachine: true */

0 comments on commit f3877eb

Please sign in to comment.