Make the "languages" array a constant variable

This commit is contained in:
Username404 2021-09-13 18:24:01 +02:00
parent 33ee011aed
commit 02bde3b106
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ inline string transpile(const ParseTree& tree, const string_view& language, cons
#include "implementations/Py.hpp" #include "implementations/Py.hpp"
enum LANGUAGE: signed short { NONE = -1, LUA, JS, PY }; enum LANGUAGE: signed short { NONE = -1, LUA, JS, PY };
constinit array<string_view, 3> languages { ".lua", ".js", ".py"}; constinit const array<string_view, 3> languages { ".lua", ".js", ".py"};
shared_ptr<Target> Target::forName(string_view name, const bool newLines = true) { shared_ptr<Target> Target::forName(string_view name, const bool newLines = true) {
LANGUAGE selected = NONE; LANGUAGE selected = NONE;