Added constructor to completion_t for guarranted initialzation of flags attribute.

This commit is contained in:
Siteshwar Vashisht
2012-01-16 23:54:57 +05:30
parent 6f330f961b
commit 7e124cf95e
7 changed files with 26 additions and 12 deletions

View File

@@ -1380,7 +1380,8 @@ static int expand_variables2( wchar_t * in, std::vector<completion_t> &out, int
wchar_t *next = (wchar_t *)al_get( &var_item_list, j );
if( is_ok && (i == 0) && (!in[stop_pos]) )
{
completion_t data_to_push = { next };
completion_t data_to_push;
data_to_push.completion = next;
out.push_back( data_to_push );
}
else
@@ -1464,7 +1465,8 @@ static int expand_variables2( wchar_t * in, std::vector<completion_t> &out, int
if( !empty )
{
completion_t data_to_push = { in };
completion_t data_to_push;
data_to_push.completion = in;
out.push_back( data_to_push );
}
else
@@ -1566,7 +1568,8 @@ static int expand_brackets( wchar_t *in, int flags, std::vector<completion_t> &o
if( bracket_begin == 0 )
{
completion_t data_to_push = { in };
completion_t data_to_push;
data_to_push.completion = in;
out.push_back( data_to_push );
return 1;
}