cssparser: make a few local variables const
authorTimm Bäder <mail@baedert.org>
Sat, 25 Jan 2020 07:40:40 +0000 (08:40 +0100)
committerTimm Bäder <mail@baedert.org>
Sun, 26 Jan 2020 17:21:07 +0000 (18:21 +0100)
gtk/css/gtkcssparser.c

index 84bc4fc8e755173972553a076c31f96fa8e84b28..a32326062951160c4a58793a5c6bd9a31a7318c0 100644 (file)
@@ -261,14 +261,14 @@ gtk_css_parser_get_end_location (GtkCssParser *self)
 const GtkCssLocation *
 gtk_css_parser_get_block_location (GtkCssParser *self)
 {
-  GtkCssParserBlock *block;
+  const GtkCssParserBlock *block;
 
   if (self->blocks->len == 0)
     {
       static const GtkCssLocation start_of_document = { 0, };
       return &start_of_document;
     }
-  
+
   block = &g_array_index (self->blocks, GtkCssParserBlock, self->blocks->len - 1);
   return &block->start_location;
 }
@@ -301,7 +301,7 @@ gtk_css_parser_peek_token (GtkCssParser *self)
 
   if (self->blocks->len)
     {
-      GtkCssParserBlock *block = &g_array_index (self->blocks, GtkCssParserBlock, self->blocks->len - 1);
+      const GtkCssParserBlock *block = &g_array_index (self->blocks, GtkCssParserBlock, self->blocks->len - 1);
       if (gtk_css_token_is (&self->token, block->end_token) ||
           gtk_css_token_is (&self->token, block->inherited_end_token) ||
           gtk_css_token_is (&self->token, block->alternative_token))