[gtk/wip/baedert/for-master: 20/29] cssparser: make a few local variables const
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 20/29] cssparser: make a few local variables const
- Date: Sun, 26 Jan 2020 17:04:05 +0000 (UTC)
commit 7108d0bd154aa3b82b4a6c5d860cf159685b2378
Author: Timm Bäder <mail baedert org>
Date: Sat Jan 25 08:40:40 2020 +0100
cssparser: make a few local variables const
gtk/css/gtkcssparser.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/css/gtkcssparser.c b/gtk/css/gtkcssparser.c
index 84bc4fc8e7..a323260629 100644
--- a/gtk/css/gtkcssparser.c
+++ b/gtk/css/gtkcssparser.c
@@ -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))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]