tiny cleanup

This commit is contained in:
Nathan Braswell
2017-09-02 09:12:25 -04:00
parent 00f29fe6a5
commit 73faf50053
2 changed files with 2 additions and 6 deletions

View File

@@ -489,9 +489,8 @@ obj c_generator (Object) {
var func_name = string()
var call_string = code_triple()
var func_return_type = get_ast_type(node)
if (func_return_type->is_ref) {
if (func_return_type->is_ref)
error("still ref in function calling")
}
if (is_dot_style_method_call(node)) {
func_name = generate_function(node->function_call.func->function_call.parameters[1]).one_string()
@@ -557,7 +556,7 @@ obj c_generator (Object) {
call_string += generate(param, enclosing_object, enclosing_func, false)
}
// temporary returns if we're asked for them or we need them for destruct
if (!func_return_type->is_ref && !func_return_type->is_void() && need_variable) {
if (!func_return_type->is_void() && need_variable) {
var pre_call = string()
// kind of ugly combo here of
var temp_ident = ast_identifier_ptr(string("temporary_return") + get_id(), func_return_type, null<ast_node>())