mirror of
https://github.com/MaskRay/ccls.git
synced 2025-02-16 21:58:08 +00:00
12 lines
382 B
C++
12 lines
382 B
C++
|
#include "message_handler.h"
|
||
|
|
||
|
MessageHandler::MessageHandler() {
|
||
|
// Dynamically allocate |message_handlers|, otherwise there will be static
|
||
|
// initialization order races.
|
||
|
if (!message_handlers)
|
||
|
message_handlers = new std::vector<MessageHandler*>();
|
||
|
message_handlers->push_back(this);
|
||
|
}
|
||
|
|
||
|
// static
|
||
|
std::vector<MessageHandler*>* MessageHandler::message_handlers = nullptr;
|