cssparser: make a few local variables const

This commit is contained in:
Timm Bäder
2020-01-25 08:40:40 +01:00
parent 36e3f4d902
commit 355a417dba

View 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))