From f0e82fcc0bc8847d3d6824c0bbb5eac1a3aa8801 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Fri, 19 Feb 2021 15:59:14 +0100 Subject: [PATCH] Make languages[3] a constant. --- src/transpiler/MainTranspile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transpiler/MainTranspile.cpp b/src/transpiler/MainTranspile.cpp index 66e4af5..bcb7bc8 100644 --- a/src/transpiler/MainTranspile.cpp +++ b/src/transpiler/MainTranspile.cpp @@ -8,7 +8,7 @@ using namespace std; enum LANGUAGE: unsigned short {LUA=2,JS=3,PY=4}; pair validLanguage(const string& it) { - string languages[3] = {".lua", ".js", ".py"}; + const string languages[3] = {".lua", ".js", ".py"}; LANGUAGE selected; bool valid = false; for (unsigned short i = 0; (i < languages->size()); i++) {