From 0b60b8d03b0ba409f3c3781a105f1ef4c0a2ab84 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Wed, 23 Jan 2013 17:23:38 -0800 Subject: [PATCH] More stlye formatting fixes --- cpp/ycm/ClangCompleter/ClangCompleter.cpp | 15 +++++---------- cpp/ycm/Future.h | 4 +--- cpp/ycm/IdentifierCompleter.cpp | 3 ++- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/cpp/ycm/ClangCompleter/ClangCompleter.cpp b/cpp/ycm/ClangCompleter/ClangCompleter.cpp index fd55a26c..c83c4d6a 100644 --- a/cpp/ycm/ClangCompleter/ClangCompleter.cpp +++ b/cpp/ycm/ClangCompleter/ClangCompleter.cpp @@ -373,9 +373,7 @@ shared_ptr< TranslationUnit > ClangCompleter::GetTranslationUnitForFile( try { unit = make_shared< TranslationUnit >( filename, unsaved_files, flags, clang_index_ ); - } - - catch ( ClangParseError & ) { + } catch ( ClangParseError & ) { return unit; } @@ -418,7 +416,8 @@ std::vector< CompletionData > ClangCompleter::SortCandidatesForQuery( std::vector< CompletionData > sorted_completion_datas; 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_ ); } @@ -466,9 +465,7 @@ void ClangCompleter::ClangThreadMain() { } clang_data_ready_condition_variable_.notify_all(); - } - - catch ( thread_interrupted & ) { + } catch ( thread_interrupted & ) { shared_lock< shared_mutex > lock( time_to_die_mutex_ ); if ( time_to_die_ ) @@ -495,9 +492,7 @@ void ClangCompleter::SortingThreadMain() { sorting_task_.Get(); ( *task )(); - } - - catch ( thread_interrupted & ) { + } catch ( thread_interrupted & ) { shared_lock< shared_mutex > lock( time_to_die_mutex_ ); if ( time_to_die_ ) diff --git a/cpp/ycm/Future.h b/cpp/ycm/Future.h index 56f51b6f..235eea24 100644 --- a/cpp/ycm/Future.h +++ b/cpp/ycm/Future.h @@ -62,9 +62,7 @@ public: T GetResults() { try { return future_.get(); - } - - catch ( boost::future_uninitialized & ) { + } catch ( boost::future_uninitialized & ) { // Do nothing and return a T() } diff --git a/cpp/ycm/IdentifierCompleter.cpp b/cpp/ycm/IdentifierCompleter.cpp index deedbcc5..7efcb89f 100644 --- a/cpp/ycm/IdentifierCompleter.cpp +++ b/cpp/ycm/IdentifierCompleter.cpp @@ -47,7 +47,8 @@ extern const unsigned int MIN_ASYNC_THREADS = 2; namespace { -void QueryThreadMain( IdentifierCompleter::LatestQueryTask &latest_query_task ) { +void QueryThreadMain( + IdentifierCompleter::LatestQueryTask &latest_query_task ) { while ( true ) { try { ( *latest_query_task.Get() )();