aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_constructed_per.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-03-19 14:32:04 +0100
committerBjörn Gustavsson <[email protected]>2013-05-31 14:52:21 +0200
commit6574e0f48d9ea6f18550d9a7a3bf3aec3d1790e3 (patch)
treef762acb763bebefa6d538a5d7dde1ac4d612c2c3 /lib/asn1/src/asn1ct_constructed_per.erl
parent2bc24f790938c8a67e38eb24ccf14fc8afeebe71 (diff)
downloadotp-6574e0f48d9ea6f18550d9a7a3bf3aec3d1790e3.tar.gz
otp-6574e0f48d9ea6f18550d9a7a3bf3aec3d1790e3.tar.bz2
otp-6574e0f48d9ea6f18550d9a7a3bf3aec3d1790e3.zip
asn1ct_constructed_per: Remove dead code for handling of ENUMERATED
An ENUMERATED is always represented as a two-tuple, never as three-tuple.
Diffstat (limited to 'lib/asn1/src/asn1ct_constructed_per.erl')
-rw-r--r--lib/asn1/src/asn1ct_constructed_per.erl16
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/asn1/src/asn1ct_constructed_per.erl b/lib/asn1/src/asn1ct_constructed_per.erl
index cb5352a4bd..1edacd266a 100644
--- a/lib/asn1/src/asn1ct_constructed_per.erl
+++ b/lib/asn1/src/asn1ct_constructed_per.erl
@@ -515,13 +515,7 @@ gen_encode_sof(Erule,Typename,SeqOrSetOf,D) when is_record(D,type) ->
emit({indent(3),"'enc_",asn1ct_gen:list2name(Typename),
"_components'(Val",ObjFun,", [])"}),
emit({nl,"].",nl}),
- NewComponentType =
- case ComponentType#type.def of
- {'ENUMERATED',_,Component}->
- ComponentType#type{def={'ENUMERATED',Component}};
- _ -> ComponentType
- end,
- gen_encode_sof_components(Erule,Typename,SeqOrSetOf,NewComponentType).
+ gen_encode_sof_components(Erule, Typename, SeqOrSetOf, ComponentType).
%% Logic copied from asn1_per_bin_rt2ct:encode_constrained_number
@@ -583,13 +577,7 @@ gen_decode_sof(Erules,Typename,SeqOrSetOf,D) when is_record(D,type) ->
emit([",",nl,
"'dec_",asn1ct_gen:list2name(Typename),
"_components'(",Num,", ",Buf,ObjFun,", []).",nl,nl]),
- NewComponentType =
- case ComponentType#type.def of
- {'ENUMERATED',_,Component}->
- ComponentType#type{def={'ENUMERATED',Component}};
- _ -> ComponentType
- end,
- gen_decode_sof_components(Erules,Typename,SeqOrSetOf,NewComponentType).
+ gen_decode_sof_components(Erules, Typename, SeqOrSetOf, ComponentType).
is_aligned(per) -> true;
is_aligned(uper) -> false.