Commit graph

4 commits

Author SHA1 Message Date
Berthold Stoeger
bf05dec52b core: turn saved_git_id into a std::string
Simplifies memory management. Think about unglobalizing this,
once everything is in C++ so that we can put an std::string
into struct divelog.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-03-02 20:50:58 +01:00
Berthold Stoeger
6b0cdb028f core: turn a few string helpers into C++
get_changes_made(), subsurface_user_agent() and normalize_cloud_name()
are only called from C++.

Avoids having to manually free the returned value and is therefore
more robust against leaks.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-03-02 20:50:58 +01:00
Berthold Stoeger
c2a5e3eb73 core: use C++-style memory management for struct dir
The code is now much easier to check for memory leaks,
since there are no explicit free()s. Yes, memory is not
released immediately, but that should be of no concern.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-03-02 20:11:43 +01:00
Berthold Stoeger
929e7ea23e core: convert core/save-git.c to C++
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-03-02 20:11:43 +01:00
Renamed from core/save-git.c (Browse further)