From 38d86acbc3868c4275a04fe2f1df83b06efafe0f Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Wed, 20 Feb 2019 16:33:54 -0800 Subject: [PATCH] Fix s_var_dispatch_table initialization It has to be declared after the variables it uses. --- src/env.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/env.cpp b/src/env.cpp index eb510e1c6..ae3725402 100644 --- a/src/env.cpp +++ b/src/env.cpp @@ -95,11 +95,6 @@ bool term_has_xn = false; /// found in `TERMINFO_DIRS` we don't to call `handle_curses()` before we've imported the latter. static bool env_initialized = false; -typedef std::unordered_map - var_dispatch_table_t; -static var_dispatch_table_t create_var_dispatch_table(); -static const var_dispatch_table_t s_var_dispatch_table = create_var_dispatch_table(); - /// List of all locale environment variable names that might trigger (re)initializing the locale /// subsystem. static const wcstring_list_t locale_variables({L"LANG", L"LANGUAGE", L"LC_ALL", L"LC_ADDRESS", @@ -112,6 +107,11 @@ static const wcstring_list_t locale_variables({L"LANG", L"LANGUAGE", L"LC_ALL", /// subsystem. static const wcstring_list_t curses_variables({L"TERM", L"TERMINFO", L"TERMINFO_DIRS"}); +typedef std::unordered_map + var_dispatch_table_t; +static var_dispatch_table_t create_var_dispatch_table(); +static const var_dispatch_table_t s_var_dispatch_table = create_var_dispatch_table(); + // Some forward declarations to make it easy to logically group the code. static void init_locale(const environment_t &vars); static void init_curses(const environment_t &vars);