Skip to content
Snippets Groups Projects
Commit b5712a1b authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Inline trivial function.

parent 9944f0b1
No related branches found
No related tags found
No related merge requests found
......@@ -71,8 +71,13 @@ int
getNoOfDaysInYearDateTime(struct _datetime* dt);
/*! \cond PRIVATE */
bool
testYearIsLeapYear(int64_t year);
static inline bool
testYearIsLeapYear(int64_t year)
{
bool isLeapYear = !(year % 400) || ((year % 100) && !(year % 4));
return isLeapYear;
}
struct _datetime *
convertDateToDateTime(struct _date* d, struct _datetime* dt_return);
......
......@@ -336,26 +336,6 @@ else
}
/*! \cond PRIVATE */
/* Internal function. Test is year a leap year? */
bool
testYearIsLeapYear(int64_t year)
{
bool flag = false;
if (!(year % 400))
flag = true;
else if (!(year % 100))
flag = false;
else if (!(year % 4))
flag = true;
else
flag = false;
return flag;
}
/*
* NOTE: Internal and not doxyfied.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment