Formatting fix
This commit is contained in:
parent
d7159a9af0
commit
78eb437b90
|
@ -56,7 +56,7 @@ void option_from_string(StringView str, InsertCompleterDesc& opt)
|
||||||
opt.param = Optional<String>{};
|
opt.param = Optional<String>{};
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
throw runtime_error("invalid completer description: " + str);;
|
throw runtime_error("invalid completer description: " + str);
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
|
|
|
@ -27,7 +27,7 @@ struct StringData : UseMemoryDomain<MemoryDomain::SharedString>
|
||||||
{
|
{
|
||||||
const int len = (int)str.length() + (back != 0 ? 1 : 0);
|
const int len = (int)str.length() + (back != 0 ? 1 : 0);
|
||||||
void* ptr = StringData::operator new(sizeof(StringData) + len + 1);
|
void* ptr = StringData::operator new(sizeof(StringData) + len + 1);
|
||||||
StringData* res = new (ptr) StringData(0, len);;
|
StringData* res = new (ptr) StringData(0, len);
|
||||||
std::copy(str.begin(), str.end(), res->data());
|
std::copy(str.begin(), str.end(), res->data());
|
||||||
if (back != 0)
|
if (back != 0)
|
||||||
res->data()[len-1] = back;
|
res->data()[len-1] = back;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user