mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-31 09:50:26 +00:00
Remove QueryDb_Handle
Code is harder to read and it doesn't belong in import_pipeline.cc.
This commit is contained in:
parent
95872d36fd
commit
1d98797f26
@ -144,7 +144,13 @@ bool QueryDbMainLoop(Config* config,
|
||||
queue->for_querydb.DequeueAll();
|
||||
bool did_work = messages.size();
|
||||
for (auto& message : messages) {
|
||||
QueryDb_Handle(message);
|
||||
for (MessageHandler* handler : *MessageHandler::message_handlers) {
|
||||
if (handler->GetId() == message->method_id) {
|
||||
handler->Run(std::move(message));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (message) {
|
||||
LOG_S(FATAL) << "Exiting; unhandled IPC message "
|
||||
<< IpcIdToString(message->method_id);
|
||||
|
@ -609,15 +609,6 @@ void Indexer_Main(Config* config,
|
||||
}
|
||||
}
|
||||
|
||||
void QueryDb_Handle(std::unique_ptr<BaseIpcMessage>& message) {
|
||||
for (MessageHandler* handler : *MessageHandler::message_handlers) {
|
||||
if (handler->GetId() == message->method_id) {
|
||||
handler->Run(std::move(message));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
void QueryDb_DoIdMap(QueueManager* queue,
|
||||
QueryDatabase* db,
|
||||
|
@ -43,9 +43,6 @@ void Indexer_Main(Config* config,
|
||||
WorkingFiles* working_files,
|
||||
MultiQueueWaiter* waiter);
|
||||
|
||||
struct BaseIpcMessage;
|
||||
void QueryDb_Handle(std::unique_ptr<BaseIpcMessage>& message);
|
||||
|
||||
bool QueryDb_ImportMain(Config* config,
|
||||
QueryDatabase* db,
|
||||
ImportManager* import_manager,
|
||||
|
Loading…
Reference in New Issue
Block a user