Fix warnings with gcc-13
This commit is contained in:
parent
1a5a31cfbf
commit
19b4149d47
|
@ -409,7 +409,7 @@ void edit(const ParametersParser& parser, Context& context, const ShellContext&)
|
||||||
{
|
{
|
||||||
if (buffer != nullptr and force_reload)
|
if (buffer != nullptr and force_reload)
|
||||||
buffer_manager.delete_buffer(*buffer);
|
buffer_manager.delete_buffer(*buffer);
|
||||||
buffer = create_buffer_from_string(std::move(name), flags, {});
|
buffer = create_buffer_from_string(name, flags, {});
|
||||||
}
|
}
|
||||||
else if (buffer->flags() & Buffer::Flags::File)
|
else if (buffer->flags() & Buffer::Flags::File)
|
||||||
throw runtime_error(format("buffer '{}' exists but is not a scratch buffer", name));
|
throw runtime_error(format("buffer '{}' exists but is not a scratch buffer", name));
|
||||||
|
@ -2632,7 +2632,7 @@ const CommandDesc declare_user_mode_cmd = {
|
||||||
CommandCompleter{},
|
CommandCompleter{},
|
||||||
[](const ParametersParser& parser, Context& context, const ShellContext&)
|
[](const ParametersParser& parser, Context& context, const ShellContext&)
|
||||||
{
|
{
|
||||||
context.keymaps().add_user_mode(std::move(parser[0]));
|
context.keymaps().add_user_mode(parser[0]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2688,7 +2688,7 @@ const CommandDesc enter_user_mode_cmd = {
|
||||||
{
|
{
|
||||||
auto lock = (bool)parser.get_switch("lock");
|
auto lock = (bool)parser.get_switch("lock");
|
||||||
KeymapMode mode = parse_keymap_mode(parser[0], context.keymaps().user_modes());
|
KeymapMode mode = parse_keymap_mode(parser[0], context.keymaps().user_modes());
|
||||||
enter_user_mode(context, std::move(parser[0]), mode, lock);
|
enter_user_mode(context, parser[0], mode, lock);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
10
src/coord.hh
10
src/coord.hh
|
@ -42,16 +42,16 @@ struct LineAndColumn
|
||||||
}
|
}
|
||||||
|
|
||||||
[[gnu::always_inline]]
|
[[gnu::always_inline]]
|
||||||
constexpr auto operator<=> (EffectiveType other) const
|
constexpr friend auto operator<=>(const EffectiveType& lhs, const EffectiveType& rhs)
|
||||||
{
|
{
|
||||||
return (line != other.line) ? line <=> other.line
|
return (lhs.line != rhs.line) ? lhs.line <=> rhs.line
|
||||||
: column <=> other.column;
|
: lhs.column <=> rhs.column;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[gnu::always_inline]]
|
[[gnu::always_inline]]
|
||||||
constexpr bool operator== (EffectiveType other) const
|
constexpr friend bool operator==(const EffectiveType& lhs, const EffectiveType& rhs)
|
||||||
{
|
{
|
||||||
return line == other.line and column == other.column;
|
return lhs.line == rhs.line and lhs.column == rhs.column;
|
||||||
}
|
}
|
||||||
|
|
||||||
friend constexpr size_t hash_value(const EffectiveType& val)
|
friend constexpr size_t hash_value(const EffectiveType& val)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user