Skip to content
Snippets Groups Projects
Commit 24192373 authored by Simon Tatham's avatar Simon Tatham
Browse files

Remove FileContents::first_index() and FilePosition::clip().

Neither is necessary any more. FileContents contains an ordinary Vec
now, with no movable origin, so its first index is always 0. That
makes the lower-bound checking half of FilePosition::clip()
meaningless (the usize index is never going to be less than 0), and in
fact _all_ of it is unnecessary, because it's only ever called in the
constructor of File, which has only just _invented_ the FilePosition's
array index field, and it did it based on looking up a string id,
which won't have returned an out-of-range value in any case.
parent c1fdbca0
No related branches found
Tags upstream/0.120
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment