Skip to content

Commit

Permalink
[Checkstyle] fix some unused import warnings + misc
Browse files Browse the repository at this point in the history
- the import warnings only appear with checkstyle dev because of some fixed crashes
- workaround for crash in FlxGame#updateInput() (see HaxeCheckstyle/haxe-checkstyle#238)
- added TestSuite to excludes again
  • Loading branch information
Gama11 authored and Aurel300 committed Apr 17, 2018
1 parent de96f02 commit 3d08444
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 24 deletions.
5 changes: 5 additions & 0 deletions checkstyle.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
["neko", "desktop", "sys"],
["android", "cpp", "mobile"]
],
"exclude": {
"all": [
"TestSuite"
]
},
"checks": [
{
"type": "ModifierOrder",
Expand Down
16 changes: 5 additions & 11 deletions flixel/FlxGame.hx
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
package flixel;

import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.Lib;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.FocusEvent;
import flash.geom.ColorTransform;
import flash.geom.Matrix;
import flash.Lib;
import flixel.effects.postprocess.PostProcess;
import flixel.graphics.tile.FlxTilesheet;
import flixel.math.FlxAngle;
import flixel.math.FlxRandom;
import flixel.system.FlxSplash;
import flixel.system.replay.FlxReplay;
import flixel.util.FlxArrayUtil;
import flixel.util.FlxColor;
import flixel.util.FlxDestroyUtil;
import openfl.Assets;
import openfl.filters.BitmapFilter;

Expand Down Expand Up @@ -814,12 +807,13 @@ class FlxGame extends Sprite
}
else
{
#end

FlxG.inputs.update();
}
#else
FlxG.inputs.update();
#end

#if FLX_RECORD
}
if (recording)
{
_replay.recordFrame();
Expand Down
2 changes: 1 addition & 1 deletion flixel/input/mouse/FlxMouse.hx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import flash.ui.Mouse;
import flash.Vector;
import flixel.FlxG;
import flixel.input.IFlxInputManager;
import flixel.input.mouse.FlxMouseButton;
import flixel.system.FlxAssets;
import flixel.system.replay.MouseRecord;
import flixel.util.FlxDestroyUtil;
import flixel.input.mouse.FlxMouseButton.FlxMouseButtonID;
#if FLX_NATIVE_CURSOR
import flash.ui.MouseCursor;
import flash.ui.MouseCursorData;
Expand Down
2 changes: 0 additions & 2 deletions flixel/math/FlxAngle.hx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import haxe.macro.Expr;
#if !macro
import flixel.FlxObject;
import flixel.FlxSprite;
import flixel.math.FlxPoint;
import flixel.system.macros.FlxMacroUtil;
#if FLX_TOUCH
import flixel.input.touch.FlxTouch;
#end
Expand Down
4 changes: 0 additions & 4 deletions flixel/system/FlxSound.hx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ import flixel.tweens.FlxTween;
import flixel.util.FlxStringUtil;
import openfl.Assets;

#if FLX_SOUND_SYSTEM
import flixel.system.frontEnds.SoundFrontEnd;
#end

/**
* This is the universal flixel sound object, used for streaming, music, and sound effects.
*/
Expand Down
3 changes: 1 addition & 2 deletions flixel/system/debug/console/Console.hx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package flixel.system.debug.console;

#if FLX_DEBUG
import openfl.events.Event;
import openfl.events.FocusEvent;
import openfl.events.KeyboardEvent;
import openfl.events.MouseEvent;
Expand All @@ -11,7 +10,7 @@ import openfl.text.TextFormat;
import openfl.ui.Keyboard;
import flixel.FlxG;
import flixel.FlxObject;
import flixel.system.debug.FlxDebugger;
import flixel.system.debug.FlxDebugger.GraphicConsole;
import flixel.system.debug.completion.CompletionList;
import flixel.system.debug.completion.CompletionHandler;
import flixel.util.FlxStringUtil;
Expand Down
8 changes: 4 additions & 4 deletions flixel/system/debug/watch/Tracker.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import flixel.FlxG;
import flixel.FlxObject;
import flixel.FlxSprite;
import flixel.FlxState;
import flixel.FlxSubState;
import flixel.effects.particles.FlxEmitter.FlxTypedEmitter;
import flixel.group.FlxSpriteGroup;
import flixel.group.FlxGroup;
import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.input.gamepad.FlxGamepad;
import flixel.input.mouse.FlxMouse;
import flixel.input.touch.FlxTouch;
Expand All @@ -22,15 +22,15 @@ import flixel.text.FlxText;
import flixel.tile.FlxTilemap;
import flixel.tweens.FlxTween;
import flixel.ui.FlxBar;
import flixel.ui.FlxButton;
import flixel.ui.FlxButton.FlxTypedButton;
import flixel.util.FlxPath;
import flixel.math.FlxPoint;
import flixel.math.FlxRect;
import flixel.util.FlxTimer;
import flixel.animation.FlxAnimationController;
import flixel.effects.particles.FlxEmitter;
using flixel.util.FlxArrayUtil;
#end

import flixel.util.FlxStringUtil;

class Tracker extends Watch
Expand Down

0 comments on commit 3d08444

Please sign in to comment.