Merge pull request #285 from JazzCore/windows_fixes

fix compiling with clang on Windows
This commit is contained in:
Val Markovic 2013-04-29 12:53:24 -07:00
commit c6b18a81d2
2 changed files with 9 additions and 9 deletions

View File

@ -177,7 +177,7 @@ Future< void > ClangCompleter::UpdateTranslationUnitAsync(
std::vector< UnsavedFile > unsaved_files, std::vector< UnsavedFile > unsaved_files,
std::vector< std::string > flags ) { std::vector< std::string > flags ) {
function< void() > functor = function< void() > functor =
bind( &ClangCompleter::UpdateTranslationUnit, boost::bind( &ClangCompleter::UpdateTranslationUnit,
boost::ref( *this ), boost::ref( *this ),
boost::move( filename ), boost::move( filename ),
boost::move( unsaved_files ), boost::move( unsaved_files ),
@ -339,19 +339,19 @@ void ClangCompleter::CreateSortingTask(
function< CompletionDatas( const CompletionDatas & ) > function< CompletionDatas( const CompletionDatas & ) >
sort_candidates_for_query_functor = sort_candidates_for_query_functor =
bind( &ClangCompleter::SortCandidatesForQuery, boost::bind( &ClangCompleter::SortCandidatesForQuery,
boost::ref( *this ), boost::ref( *this ),
query, query,
_1 ); _1 );
function< CompletionDatas() > operate_on_completion_data_functor = function< CompletionDatas() > operate_on_completion_data_functor =
bind( &ClangResultsCache::OperateOnCompletionDatas< CompletionDatas >, boost::bind( &ClangResultsCache::OperateOnCompletionDatas< CompletionDatas >,
boost::cref( latest_clang_results_ ), boost::cref( latest_clang_results_ ),
boost::move( sort_candidates_for_query_functor ) ); boost::move( sort_candidates_for_query_functor ) );
shared_ptr< packaged_task< AsyncCompletions > > task = shared_ptr< packaged_task< AsyncCompletions > > task =
make_shared< packaged_task< AsyncCompletions > >( boost::make_shared< packaged_task< AsyncCompletions > >(
bind( ReturnValueAsShared< std::vector< CompletionData > >, boost::bind( ReturnValueAsShared< std::vector< CompletionData > >,
boost::move( operate_on_completion_data_functor ) ) ); boost::move( operate_on_completion_data_functor ) ) );
future = task->get_future(); future = task->get_future();
@ -368,7 +368,7 @@ void ClangCompleter::CreateClangTask(
latest_clang_results_.ResetWithNewLineAndColumn( line, column ); latest_clang_results_.ResetWithNewLineAndColumn( line, column );
function< CompletionDatas() > candidates_for_location_functor = function< CompletionDatas() > candidates_for_location_functor =
bind( &ClangCompleter::CandidatesForLocationInFile, boost::bind( &ClangCompleter::CandidatesForLocationInFile,
boost::ref( *this ), boost::ref( *this ),
boost::move( filename ), boost::move( filename ),
line, line,
@ -381,7 +381,7 @@ void ClangCompleter::CreateClangTask(
clang_packaged_task->completions_task_ = clang_packaged_task->completions_task_ =
packaged_task< AsyncCompletions >( packaged_task< AsyncCompletions >(
bind( ReturnValueAsShared< std::vector< CompletionData > >, boost::bind( ReturnValueAsShared< std::vector< CompletionData > >,
boost::move( candidates_for_location_functor ) ) ); boost::move( candidates_for_location_functor ) ) );
clang_task_.Set( clang_packaged_task ); clang_task_.Set( clang_packaged_task );
@ -424,7 +424,7 @@ shared_ptr< TranslationUnit > ClangCompleter::GetTranslationUnitForFile(
try { try {
unit = make_shared< TranslationUnit >( unit = boost::make_shared< TranslationUnit >(
filename, unsaved_files, flags, clang_index_ ); filename, unsaved_files, flags, clang_index_ );
} catch ( ClangParseError & ) { } catch ( ClangParseError & ) {
Erase( filename_to_translation_unit_, filename ); Erase( filename_to_translation_unit_, filename );

View File

@ -129,7 +129,7 @@ CompilationDatabase::GetCompilationInfoForFileAsync(
return Future< AsyncCompilationInfoForFile >(); return Future< AsyncCompilationInfoForFile >();
function< CompilationInfoForFile() > functor = function< CompilationInfoForFile() > functor =
bind( &CompilationDatabase::GetCompilationInfoForFile, boost::bind( &CompilationDatabase::GetCompilationInfoForFile,
boost::ref( *this ), boost::ref( *this ),
path_to_file ); path_to_file );