Store ids rather than indices in SavedFilePos::file_pos.
Now array indices into FileContents's vector never persist beyond the lifetime of a FileContents. When we save the file position prior to destroying a File and its contents, we save it in the form of a string item id; when we restore later, we look up that string using the index_before_id method I just factored out.
Loading
Please register or sign in to comment