From 7acc7a8eb3da62bde5b278da46d4b7b133c7a952 Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Thu, 5 Mar 2015 23:16:30 -0800
Subject: [PATCH] Fix const correctness in Harfbuzz

to_tis620 modifies cstr, so it mustn't be const.

Change-Id: Ia0aac2f09e9245339951ffff13c8d77c886f767d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
---
 src/3rdparty/harfbuzz/src/harfbuzz-thai.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
index b79e0b6cb74..7438d5994c8 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
@@ -68,7 +68,7 @@ static int init_libthai() {
         return 0;
 }
 
-static void to_tis620(const HB_UChar16 *string, hb_uint32 len, const char *cstr)
+static void to_tis620(const HB_UChar16 *string, hb_uint32 len, char *cstr)
 {
     hb_uint32 i;
     unsigned char *result = (unsigned char *)cstr;
@@ -183,7 +183,7 @@ static int thai_contain_glyphs (HB_ShaperItem *shaper_item, const int glyph_map[
 
     for (c = 0; c < 0x80; c++) {
         if ( glyph_map[c] ) {
-            if ( !shaper_item->font->klass->canRender (shaper_item->font, (HB_UChar16 *) &glyph_map[c], 1) )
+            if ( !shaper_item->font->klass->canRender (shaper_item->font, (const HB_UChar16 *) &glyph_map[c], 1) )
                 return 0;
         }
     }
-- 
GitLab