summaryrefslogtreecommitdiff
path: root/src/basic/locale-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-05-09 11:24:08 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-05-09 15:17:57 -0400
commitdff4bf93d449b9d9086123521f83d68e98cecd09 (patch)
treeab934bca80ab4a771f1d6df2718d3498e7696d1d /src/basic/locale-util.c
parent323b7dc90343f11febf9e87872d3e8ffded11849 (diff)
locale-util: mark special_glyph() as _const_
_const_ means that the caller can assume that the function will return the same result every time (and will not modify global memory). special_glyph() meets this: even though it depends on global memory, that part of global memory is not expected to change. This allows the calls to special_glyph() to be optimized, even if -flto is not used.
Diffstat (limited to 'src/basic/locale-util.c')
-rw-r--r--src/basic/locale-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/locale-util.c b/src/basic/locale-util.c
index 8134f61a73..ada0a28cd8 100644
--- a/src/basic/locale-util.c
+++ b/src/basic/locale-util.c
@@ -273,7 +273,7 @@ out:
const char *special_glyph(SpecialGlyph code) {
- static const char *draw_table[2][_SPECIAL_GLYPH_MAX] = {
+ static const char* const draw_table[2][_SPECIAL_GLYPH_MAX] = {
/* ASCII fallback */
[false] = {
[TREE_VERTICAL] = "| ",