More stlye formatting fixes
This commit is contained in:
parent
440a2c17f2
commit
0b60b8d03b
@ -373,9 +373,7 @@ shared_ptr< TranslationUnit > ClangCompleter::GetTranslationUnitForFile(
|
|||||||
try {
|
try {
|
||||||
unit = make_shared< TranslationUnit >(
|
unit = make_shared< TranslationUnit >(
|
||||||
filename, unsaved_files, flags, clang_index_ );
|
filename, unsaved_files, flags, clang_index_ );
|
||||||
}
|
} catch ( ClangParseError & ) {
|
||||||
|
|
||||||
catch ( ClangParseError & ) {
|
|
||||||
return unit;
|
return unit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -418,7 +416,8 @@ std::vector< CompletionData > ClangCompleter::SortCandidatesForQuery(
|
|||||||
std::vector< CompletionData > sorted_completion_datas;
|
std::vector< CompletionData > sorted_completion_datas;
|
||||||
sorted_completion_datas.reserve( data_and_results.size() );
|
sorted_completion_datas.reserve( data_and_results.size() );
|
||||||
|
|
||||||
foreach ( const CompletionDataAndResult & data_and_result, data_and_results ) {
|
foreach ( const CompletionDataAndResult & data_and_result,
|
||||||
|
data_and_results ) {
|
||||||
sorted_completion_datas.push_back( *data_and_result.completion_data_ );
|
sorted_completion_datas.push_back( *data_and_result.completion_data_ );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -466,9 +465,7 @@ void ClangCompleter::ClangThreadMain() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
clang_data_ready_condition_variable_.notify_all();
|
clang_data_ready_condition_variable_.notify_all();
|
||||||
}
|
} catch ( thread_interrupted & ) {
|
||||||
|
|
||||||
catch ( thread_interrupted & ) {
|
|
||||||
shared_lock< shared_mutex > lock( time_to_die_mutex_ );
|
shared_lock< shared_mutex > lock( time_to_die_mutex_ );
|
||||||
|
|
||||||
if ( time_to_die_ )
|
if ( time_to_die_ )
|
||||||
@ -495,9 +492,7 @@ void ClangCompleter::SortingThreadMain() {
|
|||||||
sorting_task_.Get();
|
sorting_task_.Get();
|
||||||
|
|
||||||
( *task )();
|
( *task )();
|
||||||
}
|
} catch ( thread_interrupted & ) {
|
||||||
|
|
||||||
catch ( thread_interrupted & ) {
|
|
||||||
shared_lock< shared_mutex > lock( time_to_die_mutex_ );
|
shared_lock< shared_mutex > lock( time_to_die_mutex_ );
|
||||||
|
|
||||||
if ( time_to_die_ )
|
if ( time_to_die_ )
|
||||||
|
@ -62,9 +62,7 @@ public:
|
|||||||
T GetResults() {
|
T GetResults() {
|
||||||
try {
|
try {
|
||||||
return future_.get();
|
return future_.get();
|
||||||
}
|
} catch ( boost::future_uninitialized & ) {
|
||||||
|
|
||||||
catch ( boost::future_uninitialized & ) {
|
|
||||||
// Do nothing and return a T()
|
// Do nothing and return a T()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,8 @@ extern const unsigned int MIN_ASYNC_THREADS = 2;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
void QueryThreadMain( IdentifierCompleter::LatestQueryTask &latest_query_task ) {
|
void QueryThreadMain(
|
||||||
|
IdentifierCompleter::LatestQueryTask &latest_query_task ) {
|
||||||
while ( true ) {
|
while ( true ) {
|
||||||
try {
|
try {
|
||||||
( *latest_query_task.Get() )();
|
( *latest_query_task.Get() )();
|
||||||
|
Loading…
Reference in New Issue
Block a user