Make languages[3] a constant.

This commit is contained in:
Username404-59 2021-02-19 15:59:14 +01:00
parent 618d2bab60
commit f0e82fcc0b
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ using namespace std;
enum LANGUAGE: unsigned short {LUA=2,JS=3,PY=4};
pair<LANGUAGE, bool> 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++) {