Make languages[3] a constant.
This commit is contained in:
		
							parent
							
								
									618d2bab60
								
							
						
					
					
						commit
						f0e82fcc0b
					
				@ -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++) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user