Fix compilation on 32bit platforms

Fixes #3284
This commit is contained in:
Maxime Coste 2020-01-09 20:12:52 +11:00
parent f808539dea
commit 6badd74790
2 changed files with 4 additions and 3 deletions

View File

@ -219,10 +219,12 @@ void write_to_debug_buffer(StringView str)
}
}
InplaceString<23> to_string(Buffer::HistoryId id)
auto to_string(Buffer::HistoryId id)
{
using Result = decltype(to_string(size_t{}));
if (id == Buffer::HistoryId::Invalid)
return InplaceString<23>{1, "-"};
return Result{1, "-"};
return to_string(static_cast<size_t>(id));
}

View File

@ -84,7 +84,6 @@ void reload_file_buffer(Buffer& buffer);
void write_to_debug_buffer(StringView str);
InplaceString<23> to_string(Buffer::HistoryId id);
String history_as_string(const Vector<Buffer::HistoryNode>& history, Quoting quoting);
String undo_group_as_string(const Buffer::UndoGroup& undo_group, Quoting quoting);