diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-03-13 22:12:23 +0100 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2018-04-11 14:01:51 +0300 |
commit | f7b2355cedb75a8ed97644c05d57977f993cb08b (patch) | |
tree | 418456caa1f16a660002867f346ca3f89b88e8fe /core/qthelper.cpp | |
parent | 44bcc5a30772237e7f0f47d618af345520fb5804 (diff) | |
download | subsurface-f7b2355cedb75a8ed97644c05d57977f993cb08b.tar.gz |
Cleanup: unconstify results of two functions
get_dive_date_c_string() and get_current_date() return copied strings.
Make this explicit by returning non-const pointers.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/qthelper.cpp')
-rw-r--r-- | core/qthelper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 6c4fc099c..fb32fabe5 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -976,13 +976,13 @@ QString get_short_dive_date_string(timestamp_t when) return loc.toString(ts.toUTC(), QString(prefs.date_format_short) + " " + prefs.time_format); } -const char *get_dive_date_c_string(timestamp_t when) +char *get_dive_date_c_string(timestamp_t when) { QString text = get_dive_date_string(when); return copy_qstring(text); } -extern "C" const char *get_current_date() +extern "C" char *get_current_date() { QDateTime ts(QDateTime::currentDateTime());; QString current_date; |