From 72741c14a278c4c533983b4c474aee9794566763 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Thu, 15 Feb 2018 12:58:50 -0500 Subject: [PATCH] *: remove newly superfluous static types on attributes MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- contrib/nitcc/src/grammar.nit | 2 +- contrib/objcwrapper/src/objc_model.nit | 2 +- contrib/opportunity/src/opportunity_model.nit | 4 ++-- contrib/pep8analysis/src/cfg/cfg_base.nit | 2 +- contrib/pep8analysis/src/model/model.nit | 2 +- contrib/sort_downloads/src/sort_downloads.nit | 2 +- contrib/tinks/src/client/client3d.nit | 12 ++++++------ contrib/tinks/src/game/framework.nit | 2 +- .../examples/chameneos-redux/chameneosredux.nit | 4 ++-- lib/bitmap/bitmap.nit | 4 ++-- lib/bucketed_game.nit | 2 +- lib/curl/curl.nit | 2 +- lib/sax/sax_parse_exception.nit | 4 ++-- lib/saxophonit/lexer.nit | 2 +- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/contrib/nitcc/src/grammar.nit b/contrib/nitcc/src/grammar.nit index 27a98da..feb4498 100644 --- a/contrib/nitcc/src/grammar.nit +++ b/contrib/nitcc/src/grammar.nit @@ -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] diff --git a/contrib/objcwrapper/src/objc_model.nit b/contrib/objcwrapper/src/objc_model.nit index e5c5702..76b1c2d 100644 --- a/contrib/objcwrapper/src/objc_model.nit +++ b/contrib/objcwrapper/src/objc_model.nit @@ -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 diff --git a/contrib/opportunity/src/opportunity_model.nit b/contrib/opportunity/src/opportunity_model.nit index b6f8f4b..bfd092a 100644 --- a/contrib/opportunity/src/opportunity_model.nit +++ b/contrib/opportunity/src/opportunity_model.nit @@ -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 diff --git a/contrib/pep8analysis/src/cfg/cfg_base.nit b/contrib/pep8analysis/src/cfg/cfg_base.nit index d42a4b3..6825cda 100644 --- a/contrib/pep8analysis/src/cfg/cfg_base.nit +++ b/contrib/pep8analysis/src/cfg/cfg_base.nit @@ -435,7 +435,7 @@ class BasicBlock end private class Counter - var count: Int = -1 + var count = -1 fun next : Int do count += 1 diff --git a/contrib/pep8analysis/src/model/model.nit b/contrib/pep8analysis/src/model/model.nit index beea28d..f484cc1 100644 --- a/contrib/pep8analysis/src/model/model.nit +++ b/contrib/pep8analysis/src/model/model.nit @@ -65,7 +65,7 @@ class Model end redef class ALine - var address: Int = -1 + var address = -1 fun size: Int is abstract diff --git a/contrib/sort_downloads/src/sort_downloads.nit b/contrib/sort_downloads/src/sort_downloads.nit index 9b70e83..8dc99b8 100755 --- a/contrib/sort_downloads/src/sort_downloads.nit +++ b/contrib/sort_downloads/src/sort_downloads.nit @@ -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 diff --git a/contrib/tinks/src/client/client3d.nit b/contrib/tinks/src/client/client3d.nit index 3b272d6..4f63709 100644 --- a/contrib/tinks/src/client/client3d.nit +++ b/contrib/tinks/src/client/client3d.nit @@ -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") diff --git a/contrib/tinks/src/game/framework.nit b/contrib/tinks/src/game/framework.nit index 9472da6..df30aac 100644 --- a/contrib/tinks/src/game/framework.nit +++ b/contrib/tinks/src/game/framework.nit @@ -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` # diff --git a/lib/actors/examples/chameneos-redux/chameneosredux.nit b/lib/actors/examples/chameneos-redux/chameneosredux.nit index 4b8ba9f..71e54e6 100644 --- a/lib/actors/examples/chameneos-redux/chameneosredux.nit +++ b/lib/actors/examples/chameneos-redux/chameneosredux.nit @@ -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], diff --git a/lib/bitmap/bitmap.nit b/lib/bitmap/bitmap.nit index 0aceff5..e18888c 100644 --- a/lib/bitmap/bitmap.nit +++ b/lib/bitmap/bitmap.nit @@ -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] diff --git a/lib/bucketed_game.nit b/lib/bucketed_game.nit index 28129a5..213d875 100644 --- a/lib/bucketed_game.nit +++ b/lib/bucketed_game.nit @@ -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 # diff --git a/lib/curl/curl.nit b/lib/curl/curl.nit index 0e49515..57a2423 100644 --- a/lib/curl/curl.nit +++ b/lib/curl/curl.nit @@ -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 diff --git a/lib/sax/sax_parse_exception.nit b/lib/sax/sax_parse_exception.nit index 388febc..5f780f4 100644 --- a/lib/sax/sax_parse_exception.nit +++ b/lib/sax/sax_parse_exception.nit @@ -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. # diff --git a/lib/saxophonit/lexer.nit b/lib/saxophonit/lexer.nit index 92f293b..a1f7b29 100644 --- a/lib/saxophonit/lexer.nit +++ b/lib/saxophonit/lexer.nit @@ -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 -- 1.7.9.5