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>
This commit is contained in:
Berthold Stoeger 2018-03-13 22:12:23 +01:00 committed by Lubomir I. Ivanov
parent 44bcc5a307
commit f7b2355ced
5 changed files with 12 additions and 12 deletions

View file

@ -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;