Skip to content

Commit

Permalink
Merge pull request #46 from RblSb/nowarn
Browse files Browse the repository at this point in the history
Fix warnings
  • Loading branch information
AustinEast authored Feb 16, 2024
2 parents 8da415e + 21b8039 commit d889af5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"[haxe]": {
"editor.formatOnSave": true
"editor.formatOnSave": true,
"files.trimTrailingWhitespace": false,
}
}
}
5 changes: 3 additions & 2 deletions echo/Body.hx
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ class Body implements Disposable #if cog implements cog.IComponent #end {
/**
* If set, this method is called whenever the Body's X or Y changes.
*/
public var on_move:Null<Float->Float->Void>;
public var on_move:Null<(x:Float, y:Float) -> Void>;
/**
* If set, this method is called whenever the Body's rotation changes.
*/
public var on_rotate:Null<Float->Void>;
public var on_rotate:Null<(angle:Float) -> Void>;

@:allow(echo.Physics.step_body)
public var last_x(default, null):Float;
Expand Down Expand Up @@ -231,6 +231,7 @@ class Body implements Disposable #if cog implements cog.IComponent #end {
* Sets a Body's values from a `BodyOptions` object.
* @param options
*/
@:haxe.warning("-WDeprecated")
public function load_options(?options:BodyOptions) {
options = echo.util.JSON.copy_fields(options, defaults);
clear_shapes();
Expand Down
3 changes: 1 addition & 2 deletions echo/data/Data.hx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ class QuadTreeData {
public var flag = false;
}

@:enum
abstract Direction(Int) from Int to Int {
enum abstract Direction(Int) from Int to Int {
var TOP = 0;
}
6 changes: 3 additions & 3 deletions echo/data/Types.hx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package echo.data;

@:enum abstract MassType(Float) from Float to Float {
enum abstract MassType(Float) from Float to Float {
var AUTO = -1;
var STATIC = 0;
}

@:enum abstract ShapeType(Int) from Int to Int {
enum abstract ShapeType(Int) from Int to Int {
var RECT;
var CIRCLE;
var POLYGON;
}

@:enum abstract ForceType(Int) from Int to Int {
enum abstract ForceType(Int) from Int to Int {
var ACCELERATION;
var VELOCITY;
var POSITION;
Expand Down
2 changes: 1 addition & 1 deletion echo/util/Bezier.hx
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ class Bezier implements Disposable {
}
}

@:enum abstract BezierCurve(Int) to Int from Int {
enum abstract BezierCurve(Int) to Int from Int {
var Linear = 1;
var Quadratic = 2;
var Cubic = 3;
Expand Down

0 comments on commit d889af5

Please sign in to comment.