Remove a duplicate function.
This commit is contained in:
parent
17d49a8db6
commit
901f19797c
@ -42,17 +42,6 @@ endfunction
|
||||
let s:default_includes = [ '.', '..', 'include', 'includes',
|
||||
\ '../include', '../includes' ]
|
||||
|
||||
" uniquify the input list
|
||||
function! s:Unique(list)
|
||||
let l = []
|
||||
for elem in a:list
|
||||
if index(l, elem) == -1
|
||||
let l = add(l, elem)
|
||||
endif
|
||||
endfor
|
||||
return l
|
||||
endfunction
|
||||
|
||||
" convenience function to determine the 'null device' parameter
|
||||
" based on the current operating system
|
||||
function! syntastic#c#GetNullDevice()
|
||||
@ -78,7 +67,7 @@ function! syntastic#c#GetIncludeDirs(filetype)
|
||||
call extend(include_dirs, g:syntastic_{a:filetype}_include_dirs)
|
||||
endif
|
||||
|
||||
return join(map(s:Unique(include_dirs), '"-I" . v:val'), ' ')
|
||||
return join(map(syntastic#util#unique(include_dirs), '"-I" . v:val'), ' ')
|
||||
endfunction
|
||||
|
||||
" read additional compiler flags from the given configuration file
|
||||
|
@ -129,13 +129,13 @@ function! syntastic#util#compareErrorItems(a, b)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" List of buffers referenced by the location list
|
||||
" Returns unique elements in a list
|
||||
function! syntastic#util#unique(list)
|
||||
let seen = {}
|
||||
for e in a:list
|
||||
let seen[e] = 1
|
||||
endfor
|
||||
return keys(seen)
|
||||
return copy(keys(seen))
|
||||
endfunction
|
||||
|
||||
function! syntastic#util#debug(msg)
|
||||
|
Loading…
Reference in New Issue
Block a user