[pango/wip/baedert/for-master2: 11/17] break: Make a local const



commit 17248221740fa476986248f8103a333b0e23db49
Author: Timm Bäder <mail baedert org>
Date:   Fri Apr 17 08:33:55 2020 +0200

    break: Make a local const
    
    Make it clearer that we're not going to modify the attribute

 pango/break.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/pango/break.c b/pango/break.c
index 2f5ff02e..26a79873 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -1927,9 +1927,8 @@ break_attrs (const char   *text,
 
   _pango_attr_list_get_iterator (&list, &iter);
   do {
-    PangoAttribute *attr;
+    const PangoAttribute *attr = pango_attr_iterator_get (&iter, PANGO_ATTR_ALLOW_BREAKS);
 
-    attr = pango_attr_iterator_get (&iter, PANGO_ATTR_ALLOW_BREAKS);
     if (attr && ((PangoAttrInt*)attr)->value == 0)
       {
         int start, end;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]