diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-03-11 14:48:03 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-03-11 17:48:43 -0700 |
commit | b1fa82804ae42fff9a14dd4a0a0db32af8ba28f8 (patch) | |
tree | 52d1c76b579c04e94e0ed1da7db051edbf291b41 /qthelper.h | |
parent | 9cc942376e3b9b709de9bb9c58f9ae63ab1502e0 (diff) | |
download | subsurface-b1fa82804ae42fff9a14dd4a0a0db32af8ba28f8.tar.gz |
git-load: Add trips to the trip list on loading
We don't actually much use the trip list any more, and it's possible we
should simply get rid of it. I hadn't added the trips to the trip list
when loading them, and everything worked fine.
Well, *almost* everything worked fine.
There is one use of the list of trips, and that's the "clear the trip
index for each trip before saving them". That literally seems to be the
only non-debug use of this list, but when we didn't add the trips to the
list, the trip index never got cleared before saving trips.
And even that is unnoticeable for the *first* save event, because the
trip index will have been clear before that.
But on the *second* save event, if the trip index doesn't get cleared
before saving, the saving code will look at the index, say "Hey, I
already saved this" and skip the trip.
So if you loaded the trips from a git repository, and then saved things,
everything worked fine. But it you saved things a *second* time,
nothing would get saved at all, because all the trips were marked as
saved already.
Anyway, I think the real solution is to get rid of the pointless trip
list, and just use "for_each_dive()" to find all the trips, since that
list clearly is just more pain than gain. But in the meantime, this
makes the git loading add the trips properly to the list.
Signed-off-by: Linus "oops" Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qthelper.h')
0 files changed, 0 insertions, 0 deletions