diff options
Diffstat (limited to 'modules/gdscript')
| -rw-r--r-- | modules/gdscript/gd_compiler.cpp | 4 | ||||
| -rw-r--r-- | modules/gdscript/gd_compiler.h | 8 | ||||
| -rw-r--r-- | modules/gdscript/gd_parser.cpp | 2 | ||||
| -rw-r--r-- | modules/gdscript/gd_script.cpp | 4 | ||||
| -rw-r--r-- | modules/gdscript/gd_script.h | 2 | ||||
| -rw-r--r-- | modules/gdscript/gd_tokenizer.cpp | 18 |
6 files changed, 19 insertions, 19 deletions
diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp index 403af8eb0..e8e8ce4e9 100644 --- a/modules/gdscript/gd_compiler.cpp +++ b/modules/gdscript/gd_compiler.cpp @@ -776,7 +776,7 @@ int GDCompiler::_parse_expression(CodeGen& codegen,const GDParser::Node *p_expre if (named) { - key_idx = codegen.get_name_map_pos(static_cast<const GDParser::IdentifierNode*>(E->get()->arguments[1])->name); + key_idx = codegen.get_name_map_pos(static_cast<const GDParser::IdentifierNode*>(E->get()->arguments[1])->name); //printf("named key %x\n",key_idx); } else { @@ -1567,7 +1567,7 @@ Error GDCompiler::_parse_class(GDScript *p_script,GDScript *p_owner,const GDPars GDScript::MemberInfo minfo; minfo.index = p_script->member_indices.size(); minfo.setter = p_class->variables[i].setter; - minfo.getter = p_class->variables[i].getter; + minfo.getter = p_class->variables[i].getter; p_script->member_indices[name]=minfo; p_script->members.insert(name); diff --git a/modules/gdscript/gd_compiler.h b/modules/gdscript/gd_compiler.h index 5bf7ec980..32e18c6dc 100644 --- a/modules/gdscript/gd_compiler.h +++ b/modules/gdscript/gd_compiler.h @@ -44,7 +44,7 @@ class GDCompiler { List< Map<StringName,int> > stack_id_stack; Map<StringName,int> stack_identifiers; - + List<GDFunction::StackDebug> stack_debug; List< Map<StringName,int> > block_identifier_stack; Map<StringName,int> block_identifiers; @@ -65,7 +65,7 @@ class GDCompiler { void push_stack_identifiers() { stack_id_stack.push_back( stack_identifiers ); if (debug_stack) { - + block_identifier_stack.push_back(block_identifiers); block_identifiers.clear(); } @@ -74,10 +74,10 @@ class GDCompiler { void pop_stack_identifiers() { stack_identifiers = stack_id_stack.back()->get(); stack_id_stack.pop_back(); - + if (debug_stack) { for (Map<StringName,int>::Element *E=block_identifiers.front();E;E=E->next()) { - + GDFunction::StackDebug sd; sd.added=false; sd.identifier=E->key(); diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index 4f572b7b6..b713dc318 100644 --- a/modules/gdscript/gd_parser.cpp +++ b/modules/gdscript/gd_parser.cpp @@ -912,7 +912,7 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_ default: valid=false; break; } - if (valid) { + if (valid) { e.is_op=true; e.op=op; expression.push_back(e); diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index c1ee148ef..beec314e4 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -1515,7 +1515,7 @@ Variant GDScript::_new(const Variant** p_args,int p_argcount,Variant::CallError& return Variant(); } - if (ref.is_valid()) { + if (ref.is_valid()) { return ref; } else { return owner; @@ -2013,7 +2013,7 @@ void GDScript::_get_property_list(List<PropertyInfo> *p_properties) const { void GDScript::_bind_methods() { - ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"new",&GDScript::_new,MethodInfo("new")); + ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"new",&GDScript::_new,MethodInfo("new")); ObjectTypeDB::bind_method(_MD("get_as_byte_code"),&GDScript::get_as_byte_code); diff --git a/modules/gdscript/gd_script.h b/modules/gdscript/gd_script.h index a69f99314..663fc985a 100644 --- a/modules/gdscript/gd_script.h +++ b/modules/gdscript/gd_script.h @@ -260,7 +260,7 @@ friend class GDScriptLanguage; Map<StringName,Variant> constants; Map<StringName,GDFunction> member_functions; Map<StringName,MemberInfo> member_indices; //members are just indices to the instanced script. - Map<StringName,Ref<GDScript> > subclasses; + Map<StringName,Ref<GDScript> > subclasses; Map<StringName,Vector<StringName> > _signals; #ifdef TOOLS_ENABLED diff --git a/modules/gdscript/gd_tokenizer.cpp b/modules/gdscript/gd_tokenizer.cpp index 71c56aba0..56eacfd20 100644 --- a/modules/gdscript/gd_tokenizer.cpp +++ b/modules/gdscript/gd_tokenizer.cpp @@ -541,14 +541,14 @@ void GDTokenizerText::_advance() { } INCPOS(1); is_node_path=true; - + case '\'': case '"': { - + if (GETCHAR(0)=='\'') string_mode=STRING_SINGLE_QUOTE; - - + + int i=1; if (string_mode==STRING_DOUBLE_QUOTE && GETCHAR(i)=='"' && GETCHAR(i+1)=='"') { i+=2; @@ -1054,7 +1054,7 @@ Error GDTokenizerBuffer::set_code_buffer(const Vector<uint8_t> & p_buffer) { const uint8_t *buf=p_buffer.ptr(); int total_len=p_buffer.size(); ERR_FAIL_COND_V( p_buffer.size()<24 || p_buffer[0]!='G' || p_buffer[1]!='D' || p_buffer[2]!='S' || p_buffer[3]!='C',ERR_INVALID_DATA); - + int version = decode_uint32(&buf[4]); if (version>BYTECODE_VERSION) { ERR_EXPLAIN("Bytecode is too New! Please use a newer engine version."); @@ -1066,13 +1066,13 @@ Error GDTokenizerBuffer::set_code_buffer(const Vector<uint8_t> & p_buffer) { int token_count = decode_uint32(&buf[20]); const uint8_t *b=buf; - + b=&buf[24]; total_len-=24; - + identifiers.resize(identifier_count); for(int i=0;i<identifier_count;i++) { - + int len = decode_uint32(b); ERR_FAIL_COND_V(len>total_len,ERR_INVALID_DATA); b+=4; @@ -1089,7 +1089,7 @@ Error GDTokenizerBuffer::set_code_buffer(const Vector<uint8_t> & p_buffer) { total_len-=len+4; identifiers[i]=s; } - + constants.resize(constant_count); for(int i=0;i<constant_count;i++) { |
