mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: remove get_dive() function
This implicitly accessed the global divelog. Most of the users were in the test/ folder anyway. Replace by explicit accesses to the global divelog.dives. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
176f544106
commit
3660241993
8 changed files with 45 additions and 78 deletions
|
@ -30,10 +30,7 @@ void TestRenumber::testMergeAndAppend()
|
|||
QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/test47c.xml", &log), 0);
|
||||
divelog.add_imported_dives(log, import_flags::merge_all_trips);
|
||||
QCOMPARE(divelog.dives.size(), 2);
|
||||
struct dive *d = get_dive(1);
|
||||
QVERIFY(d != NULL);
|
||||
if (d)
|
||||
QCOMPARE(d->number, 2);
|
||||
QCOMPARE(divelog.dives[1]->number, 2);
|
||||
}
|
||||
|
||||
QTEST_GUILESS_MAIN(TestRenumber)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue