ycm_core now compiles cleanly with MSVC
This commit is contained in:
parent
e1584a33b0
commit
ce58bc7d75
@ -29,11 +29,8 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
using boost::packaged_task;
|
using boost::packaged_task;
|
||||||
using boost::bind;
|
|
||||||
using boost::unique_future;
|
using boost::unique_future;
|
||||||
using boost::make_shared;
|
|
||||||
using boost::shared_ptr;
|
using boost::shared_ptr;
|
||||||
using boost::bind;
|
|
||||||
using boost::thread;
|
using boost::thread;
|
||||||
|
|
||||||
namespace YouCompleteMe {
|
namespace YouCompleteMe {
|
||||||
@ -162,15 +159,15 @@ void IdentifierCompleter::AddCandidatesToDatabaseFromBufferAsync(
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
boost::function< void() > functor =
|
boost::function< void() > functor =
|
||||||
bind( &IdentifierCompleter::AddCandidatesToDatabaseFromBuffer,
|
boost::bind( &IdentifierCompleter::AddCandidatesToDatabaseFromBuffer,
|
||||||
boost::ref( *this ),
|
boost::ref( *this ),
|
||||||
boost::move( buffer_contents ),
|
boost::move( buffer_contents ),
|
||||||
boost::move( filetype ),
|
boost::move( filetype ),
|
||||||
boost::move( filepath ),
|
boost::move( filepath ),
|
||||||
collect_from_comments_and_strings );
|
collect_from_comments_and_strings );
|
||||||
|
|
||||||
buffer_identifiers_task_stack_.Push(
|
buffer_identifiers_task_stack_.Push(
|
||||||
make_shared< packaged_task< void > >( boost::move( functor ) ) );
|
boost::make_shared< packaged_task< void > >( boost::move( functor ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -204,14 +201,15 @@ Future< AsyncResults > IdentifierCompleter::CandidatesForQueryAndTypeAsync(
|
|||||||
return Future< AsyncResults >();
|
return Future< AsyncResults >();
|
||||||
|
|
||||||
FunctionReturnsStringVector functor =
|
FunctionReturnsStringVector functor =
|
||||||
bind( &IdentifierCompleter::CandidatesForQueryAndType,
|
boost::bind( &IdentifierCompleter::CandidatesForQueryAndType,
|
||||||
boost::cref( *this ),
|
boost::cref( *this ),
|
||||||
query,
|
query,
|
||||||
filetype );
|
filetype );
|
||||||
|
|
||||||
QueryTask task = make_shared< packaged_task< AsyncResults > >(
|
QueryTask task =
|
||||||
bind( ReturnValueAsShared< std::vector< std::string > >,
|
boost::make_shared< packaged_task< AsyncResults > >(
|
||||||
boost::move( functor ) ) );
|
boost::bind( ReturnValueAsShared< std::vector< std::string > >,
|
||||||
|
boost::move( functor ) ) );
|
||||||
|
|
||||||
unique_future< AsyncResults > future = task->get_future();
|
unique_future< AsyncResults > future = task->get_future();
|
||||||
|
|
||||||
@ -288,8 +286,9 @@ void IdentifierCompleter::InitThreads() {
|
|||||||
std::min( MAX_ASYNC_THREADS, thread::hardware_concurrency() ) );
|
std::min( MAX_ASYNC_THREADS, thread::hardware_concurrency() ) );
|
||||||
|
|
||||||
for ( int i = 0; i < query_threads_to_create; ++i ) {
|
for ( int i = 0; i < query_threads_to_create; ++i ) {
|
||||||
query_threads_.create_thread( bind( QueryThreadMain,
|
query_threads_.create_thread(
|
||||||
boost::ref( latest_query_task_ ) ) );
|
boost::bind( QueryThreadMain,
|
||||||
|
boost::ref( latest_query_task_ ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer_identifiers_thread_.reset(
|
buffer_identifiers_thread_.reset(
|
||||||
|
Loading…
Reference in New Issue
Block a user