From 02bde3b1062e25e7398f19588eb9866e1532c942 Mon Sep 17 00:00:00 2001 From: Username404 Date: Mon, 13 Sep 2021 18:24:01 +0200 Subject: [PATCH] Make the "languages" array a constant variable --- src/headers/transpiler/Target.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/headers/transpiler/Target.hpp b/src/headers/transpiler/Target.hpp index d875d79..1a7d3b5 100644 --- a/src/headers/transpiler/Target.hpp +++ b/src/headers/transpiler/Target.hpp @@ -95,7 +95,7 @@ inline string transpile(const ParseTree& tree, const string_view& language, cons #include "implementations/Py.hpp" enum LANGUAGE: signed short { NONE = -1, LUA, JS, PY }; -constinit array languages { ".lua", ".js", ".py"}; +constinit const array languages { ".lua", ".js", ".py"}; shared_ptr Target::forName(string_view name, const bool newLines = true) { LANGUAGE selected = NONE;