diff --git a/src/transpiler/MainTranspile.cpp b/src/transpiler/MainTranspile.cpp index ca11e71..f9840c4 100644 --- a/src/transpiler/MainTranspile.cpp +++ b/src/transpiler/MainTranspile.cpp @@ -2,15 +2,15 @@ using namespace std; -enum LANGUAGE: unsigned short {LUA=2,JS=3,PY=4}; +enum LANGUAGE: unsigned short {LUA=0,JS=1,PY=2}; pair validLanguage(const string& it) { - const string languages[3] = {".lua", ".js", ".py"}; + static const string_view languages[3] = {".lua", ".js", ".py"}; LANGUAGE selected = LUA; bool valid = false; for (unsigned short i = 0; (i < languages->size()); ++i) { if (it == languages[i]) { - selected = static_cast(i + 2); + selected = static_cast(i); valid = true; break; }