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