]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Utilizing vec_last more
authorWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 21 Nov 2012 19:44:43 +0000 (20:44 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 21 Nov 2012 19:44:43 +0000 (20:44 +0100)
parser.c

index 5adc09345d73db9967df77994e03ae8fd93f4008..0ebf2727443b694b9eb62bf459067104aca0b8e3 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -423,13 +423,13 @@ static bool parser_sy_pop(parser_t *parser, shunt *sy)
         return false;
     }
 
-    if (sy->ops[vec_size(sy->ops)-1].paren) {
+    if (vec_last(sy->ops).paren) {
         parseerror(parser, "unmatched parenthesis");
         return false;
     }
 
-    op = &operators[sy->ops[vec_size(sy->ops)-1].etype - 1];
-    ctx = sy->ops[vec_size(sy->ops)-1].ctx;
+    op = &operators[vec_last(sy->ops).etype - 1];
+    ctx = vec_last(sy->ops).ctx;
 
     DEBUGSHUNTDO(con_out("apply %s\n", op->op));