mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-31 09:50:26 +00:00
Fix ReadCharFromStdinBlocking
This commit is contained in:
parent
96a23bc573
commit
159b0b968d
@ -107,9 +107,10 @@ TEST_SUITE("FindIncludeLine") {
|
||||
}
|
||||
|
||||
optional<char> ReadCharFromStdinBlocking() {
|
||||
char c = 0;
|
||||
std::cin.read(&c, 1);
|
||||
return c;
|
||||
char c;
|
||||
if (std::cin.read(&c, 1))
|
||||
return c;
|
||||
return nullopt;
|
||||
}
|
||||
|
||||
std::unique_ptr<BaseIpcMessage> MessageRegistry::ReadMessageFromStdin(
|
||||
|
Loading…
Reference in New Issue
Block a user