mirror of
https://github.com/MaskRay/ccls.git
synced 2025-06-08 01:04:54 +00:00
Changed seperator for PathMapping so it works on windows.
This commit is contained in:
parent
8fd48f4549
commit
19a7696314
@ -20,6 +20,15 @@ Config *g_config;
|
|||||||
|
|
||||||
void DoPathMapping(std::string &arg) {
|
void DoPathMapping(std::string &arg) {
|
||||||
for (const std::string &mapping : g_config->clang.pathMappings) {
|
for (const std::string &mapping : g_config->clang.pathMappings) {
|
||||||
|
|
||||||
|
auto colon = mapping.find('>');
|
||||||
|
if (colon != std::string::npos) {
|
||||||
|
auto p = arg.find(mapping.substr(0, colon));
|
||||||
|
if (p != std::string::npos)
|
||||||
|
arg.replace(p, colon, mapping.substr(colon + 1));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Deprecated: Use only for older settings
|
||||||
auto colon = mapping.find(':');
|
auto colon = mapping.find(':');
|
||||||
if (colon != std::string::npos) {
|
if (colon != std::string::npos) {
|
||||||
auto p = arg.find(mapping.substr(0, colon));
|
auto p = arg.find(mapping.substr(0, colon));
|
||||||
@ -27,5 +36,6 @@ void DoPathMapping(std::string &arg) {
|
|||||||
arg.replace(p, colon, mapping.substr(colon + 1));
|
arg.replace(p, colon, mapping.substr(colon + 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user