File tree 1 file changed +3
-10
lines changed 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -19,27 +19,20 @@ import (
19
19
"bufio"
20
20
"os"
21
21
"strings"
22
+
23
+ "golang.org/x/exp/slices"
22
24
)
23
25
24
26
func (p * CTagsParser ) FixCLinkageTagsDeclarations () {
25
27
linesMap := p .FindCLinkageLines (p .tags )
26
28
for i := range p .tags {
27
- if sliceContainsInt (linesMap [p .tags [i ].Filename ], p .tags [i ].Line ) &&
29
+ if slices . Contains (linesMap [p .tags [i ].Filename ], p .tags [i ].Line ) &&
28
30
! strings .Contains (p .tags [i ].PrototypeModifiers , EXTERN ) {
29
31
p .tags [i ].PrototypeModifiers = p .tags [i ].PrototypeModifiers + " " + EXTERN
30
32
}
31
33
}
32
34
}
33
35
34
- func sliceContainsInt (s []int , e int ) bool {
35
- for _ , a := range s {
36
- if a == e {
37
- return true
38
- }
39
- }
40
- return false
41
- }
42
-
43
36
func (p * CTagsParser ) prototypeAndCodeDontMatch (tag * CTag ) bool {
44
37
if tag .SkipMe {
45
38
return true
You can’t perform that action at this time.
0 commit comments