Minor code cleanups in buffer.{cc,hh}

This commit is contained in:
Maxime Coste 2014-05-10 16:25:07 +01:00
parent fc13a90175
commit 05b79921a9
2 changed files with 12 additions and 19 deletions

View File

@ -187,14 +187,7 @@ struct Buffer::Modification
Modification inverse() const Modification inverse() const
{ {
Type inverse_type = Insert; return {type == Insert ? Erase : Insert, coord, content};
switch (type)
{
case Insert: inverse_type = Erase; break;
case Erase: inverse_type = Insert; break;
default: kak_assert(false);
}
return {inverse_type, coord, content};
} }
}; };