*: remove newly superfluous static types on attributes
authorAlexis Laferrière <alexis.laf@xymus.net>
Thu, 15 Feb 2018 17:58:50 +0000 (12:58 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Thu, 15 Feb 2018 18:28:09 +0000 (13:28 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

14 files changed:
contrib/nitcc/src/grammar.nit
contrib/objcwrapper/src/objc_model.nit
contrib/opportunity/src/opportunity_model.nit
contrib/pep8analysis/src/cfg/cfg_base.nit
contrib/pep8analysis/src/model/model.nit
contrib/sort_downloads/src/sort_downloads.nit
contrib/tinks/src/client/client3d.nit
contrib/tinks/src/game/framework.nit
lib/actors/examples/chameneos-redux/chameneosredux.nit
lib/bitmap/bitmap.nit
lib/bucketed_game.nit
lib/curl/curl.nit
lib/sax/sax_parse_exception.nit
lib/saxophonit/lexer.nit

index 27a98da..feb4498 100644 (file)
@@ -897,7 +897,7 @@ class LRState
        var cname: String is lazy do return name.to_cmangle
 
        # Number
-       var number: Int = -1
+       var number = -1
 
        # Set of all items
        var items = new HashSet[Item]
index e5c5702..76b1c2d 100644 (file)
@@ -45,7 +45,7 @@ class ObjcModel
        # Objective-C types available in imported modules
        #
        # TODO seach in existing wrappers
-       private var imported_types: Array[String] = ["NSObject", "NSString"]
+       private var imported_types = ["NSObject", "NSString"]
 end
 
 # Objective-C class
index b6f8f4b..bfd092a 100644 (file)
@@ -127,7 +127,7 @@ class People
        super DBObject
 
        # ID in the Database, -1 if not set
-       var id: Int = -1
+       var id = -1
        # Name of the participant
        var name: String
        # Surname of the participant
@@ -270,7 +270,7 @@ class Answer
        # Name of the answer (title)
        var name: String
        # Id in the database, -1 if not set
-       var id: Int = -1
+       var id = -1
        # Meetup the answer is linked to (null while it is not added in the database or set via API)
        var meetup: nullable Meetup = null is writable
 
index d42a4b3..6825cda 100644 (file)
@@ -435,7 +435,7 @@ class BasicBlock
 end
 
 private class Counter
-       var count: Int = -1
+       var count = -1
        fun next : Int
        do
                count += 1
index beea28d..f484cc1 100644 (file)
@@ -65,7 +65,7 @@ class Model
 end
 
 redef class ALine
-       var address: Int = -1
+       var address = -1
 
        fun size: Int is abstract
 
index 9b70e83..8dc99b8 100755 (executable)
@@ -47,7 +47,7 @@ class Config
 
        # Super directories with wanted folder names, which will be used to sort
        # the files (only their name are used, the files won't be copied there).
-       var regex_source_dirs: Array[String] = ["~/Videos/"]
+       var regex_source_dirs = ["~/Videos/"]
 
        # Will only sort files older than the number of `elapsed_days`.
        var elapsed_days = 7
index 3b272d6..4f63709 100644 (file)
@@ -41,23 +41,23 @@ redef class App
        # Models
 
        # Models of rocks
-       var models_rock = new Array[Model].with_items(
+       var models_rock = [
                new Model("models/Tall_Rock_1_01.obj"),
                new Model("models/Tall_Rock_2_01.obj"),
                new Model("models/Tall_Rock_3_01.obj"),
-               new Model("models/Tall_Rock_4_01.obj"))
+               new Model("models/Tall_Rock_4_01.obj")]
 
        # Models of trees
-       var models_tree = new Array[Model].with_items(
+       var models_tree = [
                new Model("models/Oak_Dark_01.obj"),
                new Model("models/Oak_Green_01.obj"),
                new Model("models/Large_Oak_Dark_01.obj"),
-               new Model("models/Large_Oak_Green_01.obj"))
+               new Model("models/Large_Oak_Green_01.obj")]
 
        # Models of the debris left by a destroyed tank
-       var models_debris = new Array[Model].with_items(
+       var models_debris = [
                new Model("models/debris0.obj"),
-               new Model("models/debris1.obj"))
+               new Model("models/debris1.obj")]
 
        # Model the health pickup
        var model_health = new Model("models/health.obj")
index 9472da6..df30aac 100644 (file)
@@ -31,7 +31,7 @@ class TGame
        private var clock = new Clock is noserialize
 
        # Tick count of the last turn (The first turn as a tick of 0)
-       var tick: Int = -1
+       var tick = -1
 
        # Execute the next turn and return it as a `TTurn`
        #
index 4b8ba9f..71e54e6 100644 (file)
@@ -83,8 +83,8 @@ redef class Sys
        fun blue: Int do return 0
        fun red: Int do return 1
        fun yellow: Int do return 2
-       var numbers: Array[String] = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
-       var colors: Array[String] = ["blue", "red", "yellow"]
+       var numbers = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
+       var colors = ["blue", "red", "yellow"]
        # Matrix for complementing colors
        var complements: Array[Array[Int]] = [[0, 2, 1],
                                              [2, 1, 0],
index 0aceff5..e18888c 100644 (file)
@@ -74,10 +74,10 @@ class Bitmap
        private var image_size: Int is noinit
 
        # 14-byte bitmap header
-       private var bitmap_header: Array[Int] = [66, 77, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0]
+       private var bitmap_header = [66, 77, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0]
 
        # 40-byte dib header
-       private var dib_header: Array[Int] = [40, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+       private var dib_header = [40, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                        0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
                        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                        0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
index 28129a5..213d875 100644 (file)
@@ -56,7 +56,7 @@ class Buckets[G: Game]
        type BUCKET: HashSet[Bucketable[G]]
 
        private var next_bucket: nullable BUCKET = null
-       private var current_bucket_key: Int = -1
+       private var current_bucket_key = -1
 
        # Number of `buckets`, default at 100
        #
index 0e49515..57a2423 100644 (file)
@@ -293,7 +293,7 @@ class CurlMail
        # Protocols supported to send mail to a server
        #
        # Default value at `["smtp", "smtps"]`
-       var supported_outgoing_protocol: Array[String] = ["smtp", "smtps"]
+       var supported_outgoing_protocol = ["smtp", "smtps"]
 
        # Helper method to add pair values to mail content while building it (ex: "To:", "address@mail.com")
        private fun add_pair_to_content(str: String, att: String, val: nullable String): String
index 388febc..5f780f4 100644 (file)
@@ -45,11 +45,11 @@ class SAXParseException
 
        # The line number of the end of the text that
        # caused the error or warning, or -1.
-       var line_number: Int = -1
+       var line_number = -1
 
        # The column number of the end of the text that
        # caused the error or warning, or -1.
-       var column_number: Int = -1
+       var column_number = -1
 
        # Create a new SAXParseException from a message and a Locator.
        #
index 92f293b..a1f7b29 100644 (file)
@@ -37,7 +37,7 @@ class XophonLexer
        # Last read byte.
        #
        # Equals `-1` on end of file or error.
-       private var last_char: Int = -1
+       private var last_char = -1
 
        # Before end-of-line handling, was the last read byte a CARRIAGE RETURN?
        private var was_cr: Bool = false