From 8b22c4372a3cea12e2729899a89000caa4a1d440 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Sat, 2 Feb 2013 21:49:55 -0800 Subject: [PATCH] Fixing code style issues --- cpp/ycm/ClangCompleter/CompilationDatabase.cpp | 14 +++++++------- cpp/ycm/ClangCompleter/CompilationDatabase.h | 4 ++-- cpp/ycm/ClangCompleter/TranslationUnit.cpp | 2 +- cpp/ycm/IdentifierCompleter.cpp | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cpp/ycm/ClangCompleter/CompilationDatabase.cpp b/cpp/ycm/ClangCompleter/CompilationDatabase.cpp index c8056a89..4f8a037d 100644 --- a/cpp/ycm/ClangCompleter/CompilationDatabase.cpp +++ b/cpp/ycm/ClangCompleter/CompilationDatabase.cpp @@ -82,7 +82,7 @@ bool CompilationDatabase::DatabaseSuccessfullyLoaded() { CompilationInfoForFile CompilationDatabase::GetCompilationInfoForFile( - const std::string &path_to_file ) { + const std::string &path_to_file ) { CompilationInfoForFile info; if ( !is_loaded_ ) @@ -107,14 +107,14 @@ CompilationInfoForFile CompilationDatabase::GetCompilationInfoForFile( 0 ); info.compiler_working_dir_ = CXStringToString( - clang_CompileCommand_getDirectory( command ) ); + clang_CompileCommand_getDirectory( command ) ); uint num_flags = clang_CompileCommand_getNumArgs( command ); info.compiler_flags_.reserve( num_flags ); for ( uint i = 0; i < num_flags; ++i ) { info.compiler_flags_.push_back( - CXStringToString( clang_CompileCommand_getArg( command, i ) ) ); + CXStringToString( clang_CompileCommand_getArg( command, i ) ) ); } return info; @@ -123,7 +123,7 @@ CompilationInfoForFile CompilationDatabase::GetCompilationInfoForFile( Future< AsyncCompilationInfoForFile > CompilationDatabase::GetCompilationInfoForFileAsync( - const std::string &path_to_file ) { + const std::string &path_to_file ) { // TODO: throw exception when threading is not enabled and this is called if ( !threading_enabled_ ) return Future< AsyncCompilationInfoForFile >(); @@ -134,9 +134,9 @@ CompilationDatabase::GetCompilationInfoForFileAsync( path_to_file ); InfoTask task = - make_shared< packaged_task< AsyncCompilationInfoForFile > >( - bind( ReturnValueAsShared< CompilationInfoForFile >, - functor ) ); + make_shared< packaged_task< AsyncCompilationInfoForFile > >( + bind( ReturnValueAsShared< CompilationInfoForFile >, + functor ) ); unique_future< AsyncCompilationInfoForFile > future = task->get_future(); info_task_stack_.Push( task ); diff --git a/cpp/ycm/ClangCompleter/CompilationDatabase.h b/cpp/ycm/ClangCompleter/CompilationDatabase.h index f5756af1..1205f9ce 100644 --- a/cpp/ycm/ClangCompleter/CompilationDatabase.h +++ b/cpp/ycm/ClangCompleter/CompilationDatabase.h @@ -47,10 +47,10 @@ public: void EnableThreading(); CompilationInfoForFile GetCompilationInfoForFile( - const std::string &path_to_file ); + const std::string &path_to_file ); Future< AsyncCompilationInfoForFile > GetCompilationInfoForFileAsync( - const std::string &path_to_file ); + const std::string &path_to_file ); typedef boost::shared_ptr < boost::packaged_task< AsyncCompilationInfoForFile > > InfoTask; diff --git a/cpp/ycm/ClangCompleter/TranslationUnit.cpp b/cpp/ycm/ClangCompleter/TranslationUnit.cpp index c33bfb1e..257cdb3f 100644 --- a/cpp/ycm/ClangCompleter/TranslationUnit.cpp +++ b/cpp/ycm/ClangCompleter/TranslationUnit.cpp @@ -37,7 +37,7 @@ typedef shared_ptr < remove_pointer< CXCodeCompleteResults >::type > CodeCompleteResultsWrap; TranslationUnit::TranslationUnit() - : filename_(""), + : filename_( "" ), clang_translation_unit_( NULL ) { } diff --git a/cpp/ycm/IdentifierCompleter.cpp b/cpp/ycm/IdentifierCompleter.cpp index 7efcb89f..ca58561a 100644 --- a/cpp/ycm/IdentifierCompleter.cpp +++ b/cpp/ycm/IdentifierCompleter.cpp @@ -48,7 +48,7 @@ extern const unsigned int MIN_ASYNC_THREADS = 2; namespace { void QueryThreadMain( - IdentifierCompleter::LatestQueryTask &latest_query_task ) { + IdentifierCompleter::LatestQueryTask &latest_query_task ) { while ( true ) { try { ( *latest_query_task.Get() )();