From bfdaa53a4d0712d05b6450e35136b5d7996a2157 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Fri, 17 Apr 2020 12:32:07 +0200 Subject: [PATCH] Apply checkstyle --- Sources/arm/format/FbxBinaryParser.hx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Sources/arm/format/FbxBinaryParser.hx b/Sources/arm/format/FbxBinaryParser.hx index 647ce018..bebfe27d 100644 --- a/Sources/arm/format/FbxBinaryParser.hx +++ b/Sources/arm/format/FbxBinaryParser.hx @@ -18,12 +18,11 @@ class FbxBinaryParser { var valid = readChars(magic.length) == magic; if (!valid) return; var version = read32(); - is64 = false; - if (version >= 7500) is64 = true; + is64 = version >= 7500; root = { name : "Root", props : [PInt(0), PString("Root"), PString("Root")], - childs : parseNodes(is64) + childs : parseNodes() }; } @@ -99,16 +98,17 @@ class FbxBinaryParser { } } - function parseNode(is64): FbxNode { - var endPos = null; - var numProps = null; - var propListLen = null; + function parseNode(): FbxNode { + var endPos = 0; + var numProps = 0; + var propListLen = 0; - if(is64) { + if (is64) { endPos = read64(); numProps = read64(); propListLen = read64(); - } else { + } + else { endPos = read32(); numProps = read32(); propListLen = read32(); @@ -127,17 +127,17 @@ class FbxBinaryParser { if (listLen > 0) { childs = []; while (true) { - var nested = parseNode(is64); + var nested = parseNode(); nested == null ? break : childs.push(nested); } } return { name: name, props: props, childs: childs }; } - function parseNodes(is64): Array { + function parseNodes(): Array { var nodes = []; while (true) { - var n = parseNode(is64); + var n = parseNode(); n == null ? break : nodes.push(n); } return nodes;