mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: replace same_weightsystem() by operator==()
The important point is that this now takes a reference that avoid string copying. The old code used C-strings and therefore copy-semantics were OK. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
fb3a157462
commit
777e7f32a5
4 changed files with 8 additions and 7 deletions
|
|
@ -1720,7 +1720,7 @@ static void merge_cylinders(struct dive &res, const struct dive &a, const struct
|
|||
/* Check whether a weightsystem table contains a given weightsystem */
|
||||
static bool has_weightsystem(const weightsystem_table &t, const weightsystem_t &w)
|
||||
{
|
||||
return any_of(t.begin(), t.end(), [&w] (auto &w2) { return same_weightsystem(w, w2); });
|
||||
return any_of(t.begin(), t.end(), [&w] (auto &w2) { return w == w2; });
|
||||
}
|
||||
|
||||
static void merge_equipment(struct dive &res, const struct dive &a, const struct dive &b)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue