Skip to content

Commit

Permalink
Simplify isString() function
Browse files Browse the repository at this point in the history
  • Loading branch information
nnnnblaser committed Jul 20, 2023
1 parent c11c222 commit 823b0dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ttcn3/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ type ListType struct {

func (t *ListType) String() string {
elem := "any"
if t.ElementType != nil && !isString(t) {
if t.ElementType != nil && !isString(t.Kind) {
elem = t.ElementType.String()
}
switch t.Kind {
Expand Down Expand Up @@ -219,8 +219,8 @@ func (t *ListType) String() string {
return ""
}

func isString(t *ListType) bool {
if t.Kind == Bitstring || t.Kind == Charstring || t.Kind == Octetstring || t.Kind == Hexstring || t.Kind == UniversalCharstring {
func isString(t Kind) bool {
if t == Bitstring || t == Charstring || t == Octetstring || t == Hexstring || t == UniversalCharstring {
return true
}
return false
Expand Down

0 comments on commit 823b0dc

Please sign in to comment.