1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-24 07:53:41 +03:00

Remove the to_string(unsigned) (it conflicts with to_string(size_t) on x86)

Just cast to int when we pass an unsigned.
This commit is contained in:
Maxime Coste 2016-08-31 09:07:33 +01:00
parent 80298a95a0
commit 97e36233fb
3 changed files with 2 additions and 10 deletions

View File

@ -716,7 +716,7 @@ void select_regex(Context& context, NormalParams params)
{
const char reg = to_lower(params.reg ? params.reg : '/');
unsigned capture = (unsigned)params.count;
auto prompt = capture ? format("select (capture {}):", capture) : "select:"_str;
auto prompt = capture ? format("select (capture {}):", (int)capture) : "select:"_str;
regex_prompt(context, std::move(prompt),
[reg, capture](Regex ex, PromptEvent event, Context& context) {
if (ex.empty())
@ -732,7 +732,7 @@ void split_regex(Context& context, NormalParams params)
{
const char reg = to_lower(params.reg ? params.reg : '/');
unsigned capture = (unsigned)params.count;
auto prompt = capture ? format("split (on capture {}):", capture) : "split:"_str;
auto prompt = capture ? format("split (on capture {}):", (int)capture) : "split:"_str;
regex_prompt(context, std::move(prompt),
[reg, capture](Regex ex, PromptEvent event, Context& context) {
if (ex.empty())

View File

@ -307,13 +307,6 @@ InplaceString<15> to_string(int val)
return res;
}
InplaceString<15> to_string(unsigned val)
{
InplaceString<15> res;
res.m_length = sprintf(res.m_data, "%u", val);
return res;
}
InplaceString<23> to_string(long int val)
{
InplaceString<23> res;

View File

@ -327,7 +327,6 @@ inline Hex hex(size_t val) { return {val}; }
InplaceString<15> to_string(int val);
InplaceString<23> to_string(long int val);
InplaceString<15> to_string(unsigned val);
InplaceString<23> to_string(size_t val);
InplaceString<23> to_string(Hex val);
InplaceString<23> to_string(float val);