Merge: Fix misc warnings
authorJean Privat <jean@pryen.org>
Sun, 14 Dec 2014 13:44:05 +0000 (08:44 -0500)
committerJean Privat <jean@pryen.org>
Sun, 14 Dec 2014 13:44:05 +0000 (08:44 -0500)
For useless empty init and null comparisons

Pull-Request: #1012
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>

contrib/pep8analysis/src/ast/pretty_instructions.nit
contrib/pep8analysis/src/backbone.nit
contrib/pep8analysis/src/flow_analysis/reaching_defs.nit
contrib/pep8analysis/src/parser/parser.nit
lib/markdown/test_markdown.nit
lib/neo4j/jsonable.nit
lib/neo4j/neo4j.nit
lib/nitcorn/http_request.nit
src/astprinter.nit
src/doc/doc_templates.nit

index 98380f7..5b56ebe 100644 (file)
@@ -25,7 +25,6 @@ class ASTPrinter
 
        var str = "" is writable
 
-       init do end
        redef fun visit(n) do n.accept_ast_printer(self)
 end
 
index 02042bd..d731e41 100644 (file)
@@ -5,8 +5,6 @@ import parser
 class AnalysisManager
        super Noter
        var opts = new OptionContext
-
-       init do end
 end
 
 abstract class Noter
index 052d8df..0df593b 100644 (file)
@@ -14,7 +14,6 @@ end
 class ReachingDefsAnalysis
        super FineFlowAnalysis[ReachingDefsMap]
 
-       init do end
        redef fun is_forward do return true
 
        redef fun visit( node )
index 4fd6be1..2be9a9a 100644 (file)
@@ -292,8 +292,6 @@ private class ComputeProdLocationVisitor
                        end
                end
        end
-
-       init do end
 end
 
 # Each reduca action has its own class, this one is the root of the hierarchy.
index a8d3b9f..8894d47 100644 (file)
@@ -2522,8 +2522,6 @@ class TestLine
 
        var subject: MDLine
 
-       init do end
-
        fun test_is_empty do
                subject = new MDLine("")
                assert subject.is_empty
index 3578d59..95a76a3 100644 (file)
@@ -172,8 +172,6 @@ class JsonArray
 
        private var array = new Array[nullable Jsonable]
 
-       init do end
-
        # init the JSON Array from a Nit `Collection`
        init from(items: Collection[nullable Jsonable]) do
                array.add_all(items)
index f03e2f0..4694f8d 100644 (file)
@@ -405,8 +405,6 @@ class CypherQuery
        # `params` to embed in the query like in prepared statements
        var params = new JsonObject
 
-       init do end
-
        # init the query from a query string
        init from_string(query: String) do
                self.query = query
index 47e6823..e4628af 100644 (file)
@@ -110,8 +110,6 @@ class HttpRequestParser
        # Words of the first line
        private var first_line = new Array[String]
 
-       init do end
-
        fun parse_http_request(full_request: String): nullable HttpRequest
        do
                clear_data
index 219b61a..1a4d804 100644 (file)
@@ -47,15 +47,6 @@ private class ASTPrinterVisitor
        do
                if last_current != current_node then
                        last_current = current_node
-                       var l = current_node._location
-                       if l != null then
-                               eol
-                               out.add(s)
-                               out.add("\t# {l.colored_line("0;32").split_with('\n').first}")
-                               has_eol = false
-                               eol
-                               return
-                       end
                end
                out.add(s)
                has_eol = false
index 7624626..8384ba9 100644 (file)
@@ -567,8 +567,6 @@ class TplClassDefinition
        var intros = new Array[TplListElt]
        var redefs = new Array[TplListElt]
 
-       init do end
-
        redef fun rendering do
                addn "<div class='definition'>"
                render_comment
@@ -692,8 +690,6 @@ class TplList
        # Add content wrapped in a <li> element
        fun add_li(item: TplListItem) do elts.add item
 
-       init do end
-
        init with_classes(classes: Array[String]) do self.css_classes = classes
 
        fun is_empty: Bool do return elts.is_empty
@@ -721,8 +717,6 @@ class TplListItem
        # CSS classes of the <li> element
        var css_classes = new Array[String]
 
-       init do end
-
        init with_content(content: Streamable) do append(content)
 
        init with_classes(content: Streamable, classes: Array[String]) do