mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: const-ify utc_mktime()
To make it clear that the struct tm is only used as an input parameter. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4c85357dcc
commit
6b46e8ae57
2 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern timestamp_t utc_mktime(struct tm *tm);
|
extern timestamp_t utc_mktime(const struct tm *tm);
|
||||||
extern void utc_mkdate(timestamp_t, struct tm *tm);
|
extern void utc_mkdate(timestamp_t, struct tm *tm);
|
||||||
extern int utc_year(timestamp_t timestamp);
|
extern int utc_year(timestamp_t timestamp);
|
||||||
extern int utc_weekday(timestamp_t timestamp);
|
extern int utc_weekday(timestamp_t timestamp);
|
||||||
|
|
|
@ -99,7 +99,7 @@ void utc_mkdate(timestamp_t timestamp, struct tm *tm)
|
||||||
tm->tm_mon = m;
|
tm->tm_mon = m;
|
||||||
}
|
}
|
||||||
|
|
||||||
timestamp_t utc_mktime(struct tm *tm)
|
timestamp_t utc_mktime(const struct tm *tm)
|
||||||
{
|
{
|
||||||
static const int mdays[] = {
|
static const int mdays[] = {
|
||||||
0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
|
0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue