]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc: Fix new warnings
authorFlorian Brosch <flo.brosch@gmail.com>
Mon, 25 Jul 2011 09:43:33 +0000 (11:43 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Fri, 29 Jul 2011 00:45:26 +0000 (02:45 +0200)
src/libvaladoc/markupreader.vala
src/libvaladoc/parser/rule.vala
src/libvaladoc/parser/token.vala

index d6ea9d99a91c15fdce8b2d052c7f36fdcbfb771d..b4bf82fb27d0a299631c46d46008ee310b958da6 100644 (file)
@@ -118,6 +118,8 @@ public class Valadoc.MarkupReader : Object {
 
                if (empty_element) {
                        empty_element = false;
+                       token_begin = MarkupSourceLocation (begin, line, column);
+                       token_end = MarkupSourceLocation (begin, line, column);
                        return MarkupTokenType.END_ELEMENT;
                }
 
@@ -125,9 +127,7 @@ public class Valadoc.MarkupReader : Object {
 
                MarkupTokenType type = MarkupTokenType.NONE;
                char* begin = current;
-               token_begin.pos = begin;
-               token_begin.line = line;
-               token_begin.column = column;
+               token_begin = MarkupSourceLocation (begin, line, column);
 
                if (current >= end) {
                        type = MarkupTokenType.EOF;
@@ -217,9 +217,7 @@ public class Valadoc.MarkupReader : Object {
                        type = MarkupTokenType.TEXT;
                }
 
-               token_end.pos = current;
-               token_end.line = line;
-               token_end.column = column - 1;
+               token_end = MarkupSourceLocation (current, line, column - 1);
 
                return type;
        }
index b75e39ad0ce6abc168ec2de4a108379fe8f1e9c0..192cfa5519006decd2e7705cab17777de223b721 100755 (executable)
@@ -143,6 +143,8 @@ public abstract class Valadoc.Rule : Object {
                        handled = false;
                        return true;
                }
+
+               handled = false;
                return false;
        }
 
index d6917dff6172f6bec66154dc81a69a62c57f086f..ced9ab3277af66339217c4ac564b140567e401d0 100755 (executable)
@@ -97,6 +97,6 @@ public class Valadoc.Token : Object {
 
        public int to_int () {
                assert (is_number);
-               return _word.to_int ();
+               return int.parse (_word);
        }
 }