mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
44bcc5a307
commit
f7b2355ced
5 changed files with 12 additions and 12 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue