mirror of
https://github.com/MaskRay/ccls.git
synced 2025-06-10 02:02:12 +00:00
constexpr std::string_view -> const std::string_view
This works around rC347417 which has a bad interaction with libstdc++'s implementation of P0426 constexpr std::string_view also emits a string_view object in .rodata that cannot be optimized out by clang (which means larger object file size) So use good old const.
This commit is contained in:
parent
ee8e14560d
commit
23e6e3e897
@ -424,8 +424,8 @@ void LaunchStdin() {
|
|||||||
std::thread([]() {
|
std::thread([]() {
|
||||||
set_thread_name("stdin");
|
set_thread_name("stdin");
|
||||||
std::string str;
|
std::string str;
|
||||||
|
const std::string_view kContentLength("Content-Length: ");
|
||||||
while (true) {
|
while (true) {
|
||||||
constexpr std::string_view kContentLength("Content-Length: ");
|
|
||||||
int len = 0;
|
int len = 0;
|
||||||
str.clear();
|
str.clear();
|
||||||
while (true) {
|
while (true) {
|
||||||
@ -465,7 +465,6 @@ void LaunchStdin() {
|
|||||||
std::string method;
|
std::string method;
|
||||||
ReflectMember(reader, "id", id);
|
ReflectMember(reader, "id", id);
|
||||||
ReflectMember(reader, "method", method);
|
ReflectMember(reader, "method", method);
|
||||||
auto param = std::make_unique<rapidjson::Value>();
|
|
||||||
on_request->PushBack(
|
on_request->PushBack(
|
||||||
{id, std::move(method), std::move(message), std::move(document)});
|
{id, std::move(method), std::move(message), std::move(document)});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user