From 64fa3132d4399b01073d8ff95b8c0f35fc476817 Mon Sep 17 00:00:00 2001 From: totoro Date: Sun, 12 Mar 2017 22:16:28 +0100 Subject: [PATCH] finalize float implementation --- src/generation/types_messages.anubis | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/generation/types_messages.anubis b/src/generation/types_messages.anubis index 9830947..b50c865 100644 --- a/src/generation/types_messages.anubis +++ b/src/generation/types_messages.anubis @@ -65,7 +65,9 @@ public define String string then "add_string("+type_msg+", \""+field_name+"\", _"+name+")", float then - "add_float32("+type_msg+", \""+field_name+"\", _"+name+")", + "add_double("+type_msg+", \""+field_name+"\", _"+name+")", +// float32 then +// "add_float32("+type_msg+", \""+field_name+"\", _"+name+")", // float64 then // "add_float64("+type_msg+", \""+field_name+"\", _"+name+")", ds_type(type_name) then @@ -210,7 +212,8 @@ public define String word16 then indent + "with " + name + " = find_int16_list("+type_msg+", \""+field_name+"\"),\n", word32 then indent + "with " + name + " = find_int32_list("+type_msg+", \""+field_name+"\"),\n", string then indent + "with " + name + " = find_string_list("+type_msg+", \""+field_name+"\"),\n", - float then indent + "with " + name + " = find_float32_list("+type_msg+", \""+field_name+"\"),\n", + float then indent + "with " + name + " = find_float64_list("+type_msg+", \""+field_name+"\"),\n", +// float32 then indent + "with " + name + " = find_float32_list("+type_msg+", \""+field_name+"\"),\n", // float64 then indent + "with " + name + " = find_float64_list("+type_msg+", \""+field_name+"\"),\n", ds_type(type_name) then brace_counter <- *brace_counter + 1; @@ -259,10 +262,13 @@ public define String indent + "if find_string("+type_msg+", \""+field_name+"\")"+" is {failure then failure, success("+name+") then\n", float then brace_counter <- (*brace_counter + 1); - indent + "if find_float32("+type_msg+", \""+field_name+"\)"+" is {failure then failure, success("+name+") then\n", + indent + "if find_float64("+type_msg+", \""+field_name+"\")"+" is {failure then failure, success("+name+") then\n", +// float32 then +// brace_counter <- (*brace_counter + 1); +// indent + "if find_float32("+type_msg+", \""+field_name+"\")"+" is {failure then failure, success("+name+") then\n", // float64 then // brace_counter <- (*brace_counter + 1); -// indent + "if find_float64("+type_msg+", \""+field_name+"\)"+" is {failure then failure, success("+name+") then\n", +// indent + "if find_float64("+type_msg+", \""+field_name+"\")"+" is {failure then failure, success("+name+") then\n", ds_type(type_name) then brace_counter <- (*brace_counter + 2); indent + "if find_message("+type_msg+", \""+field_name+"\")"+" is {failure then failure, success("+name+"_msg) then\n"+ -- libgit2 0.21.4