From 9ca1a9e1587602100995d79d7e8115b155ed0b32 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Fri, 9 Nov 2018 10:42:53 -0800 Subject: [PATCH] [Swift] Remove ATNState.INITIAL_NUM_TRANSITIONS. This was brought over from the Java runtime in the initial port, but there it was used as an array capacity hint. We're not using it in Swift so this is useless. --- runtime/Swift/Sources/Antlr4/atn/ATNState.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/runtime/Swift/Sources/Antlr4/atn/ATNState.swift b/runtime/Swift/Sources/Antlr4/atn/ATNState.swift index ee897b2a5..48a1b374e 100644 --- a/runtime/Swift/Sources/Antlr4/atn/ATNState.swift +++ b/runtime/Swift/Sources/Antlr4/atn/ATNState.swift @@ -66,8 +66,6 @@ /// /// public class ATNState: Hashable, CustomStringConvertible { - public static let INITIAL_NUM_TRANSITIONS: Int = 4 - // constants for serialization public static let INVALID_TYPE: Int = 0 public static let BASIC: Int = 1 @@ -117,8 +115,7 @@ public class ATNState: Hashable, CustomStringConvertible { /// /// Track the transitions emanating from this ATN state. /// - internal final var transitions: Array = Array() - //Array(INITIAL_NUM_TRANSITIONS); + internal final var transitions = [Transition]() /// /// Used to cache lookahead during parsing, not used during construction