From 7e5865248225e0934bef6c60e474018f28075cea Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Tue, 2 Dec 2014 15:32:49 +0100 Subject: Remove code duplication --- lib/asn1/src/asn1ct_check.erl | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl index cfd31474da..4ff8a414fb 100644 --- a/lib/asn1/src/asn1ct_check.erl +++ b/lib/asn1/src/asn1ct_check.erl @@ -3058,23 +3058,8 @@ instantiate_ptype(S,Ptypedef,ParaList) -> %% NewS = S#state{type=NewType,parameters=MatchedArgs,abscomppath=[]}, check_type(NewS, Ptypedef#ptypedef{typespec=NewType}, NewType). -get_datastr_name(#typedef{name=N}) -> - N; -get_datastr_name(#classdef{name=N}) -> - N; -get_datastr_name(#valuedef{name=N}) -> - N; -get_datastr_name(#ptypedef{name=N}) -> - N; -get_datastr_name(#pvaluedef{name=N}) -> - N; -get_datastr_name(#pvaluesetdef{name=N}) -> - N; -get_datastr_name(#pobjectdef{name=N}) -> - N; -get_datastr_name(#pobjectsetdef{name=N}) -> - N. - +get_datastr_name(Type) -> + asn1ct:get_name_of_def(Type). get_pt_args(#ptypedef{args=Args}) -> Args; -- cgit v1.2.3