From 209f2fd7775f6bef6c74d8b2f8c734e36a09bf1a Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Fri, 26 Apr 2013 22:32:22 -0700 Subject: [PATCH] Minor refactoring for simplicity --- python/completers/cpp/flags.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/python/completers/cpp/flags.py b/python/completers/cpp/flags.py index 1a17691f..3c16d884 100644 --- a/python/completers/cpp/flags.py +++ b/python/completers/cpp/flags.py @@ -75,8 +75,7 @@ class Flags( object ): for flag in flags: if next_flag_is_include_path: next_flag_is_include_path = False - if flag: - include_paths.append( flag ) + include_paths.append( flag ) for path_flag in path_flags: if flag == path_flag: @@ -85,9 +84,8 @@ class Flags( object ): if flag.startswith( path_flag ): path = flag[ len( path_flag ): ] - if path: - include_paths.append( path ) - return include_paths + include_paths.append( path ) + return [ x for x in include_paths if x ]