mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: convert filter_constraint_data_to_string to C++
Return an std::string to avoid memory management headaches. While doing that, convert time.c to C++ so that format_datetime directly returns an std::string. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
898ecd2df5
commit
2e1d852e36
8 changed files with 29 additions and 32 deletions
|
|
@ -16,12 +16,15 @@ extern int utc_weekday(timestamp_t timestamp);
|
|||
|
||||
/* parse and format date times of the form YYYY-MM-DD hh:mm:ss */
|
||||
extern timestamp_t parse_datetime(const char *s); /* returns 0 on error */
|
||||
extern char *format_datetime(timestamp_t timestamp); /* ownership of string passed to caller */
|
||||
|
||||
extern const char *monthname(int mon);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#include <string>
|
||||
std::string format_datetime(timestamp_t timestamp); /* ownership of string passed to caller */
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue