# HG changeset patch # User Manuele Conti # Date 1353667137 -3600 # Node ID 36f91a5e4fc8ce354207c33601f8dae684961f54 # Parent 5c389814f496d89f13117100c4d58f17b3b153f4 Set ENO to false when conversion function fails. diff -r 5c389814f496 -r 36f91a5e4fc8 stage1_2/create_enumtype_conversion_functions.cc --- a/stage1_2/create_enumtype_conversion_functions.cc Fri Nov 23 14:11:57 2012 +0100 +++ b/stage1_2/create_enumtype_conversion_functions.cc Fri Nov 23 11:38:57 2012 +0100 @@ -157,6 +157,7 @@ STRING_TO_ := ; RETURN; END_IF; + ENO := FALSE; END_FUNCTION Note: if you change code below remember to update this comment. @@ -172,9 +173,10 @@ std::string value = *itr; text += "IF IN = '" + value + "' THEN\n"; text += " " + functionName + " := " + value + ";\n"; - text += " RETURN;\n"; + text += " RETURN;\n"; text += "END_IF;\n"; } + text += "ENO := FALSE;\n"; text += "END_FUNCTION\n\n"; } @@ -196,6 +198,7 @@ _TO_STRING := ''; RETURN; END_IF; + ENO := FALSE; END_FUNCTION Note: if you change code below remember to update this comment. @@ -214,6 +217,7 @@ text += " RETURN;\n"; text += "END_IF;\n"; } + text += "ENO := FALSE;\n"; text += "END_FUNCTION\n\n"; } @@ -235,6 +239,7 @@ _TO_ := ; RETURN; END_IF; + ENO := FALSE; END_FUNCTION Note: if you change code below remember to update this comment. @@ -260,6 +265,7 @@ text += "END_IF;\n"; count++; } + text += "ENO := FALSE;\n"; text += "END_FUNCTION\n\n"; } @@ -281,6 +287,7 @@ _TO_ := N; RETURN; END_IF; + ENO := FALSE; END_FUNCTION Note: if you change code below remember to update this comment. @@ -306,6 +313,7 @@ text += "END_IF;\n"; count++; } + text += "ENO := FALSE;\n"; text += "END_FUNCTION\n\n"; }