Skip to content

Commit

Permalink
RTC: Fix RtcTime to allow constructors to be used without nsec
Browse files Browse the repository at this point in the history
Fix RtcTime to allow constructors to be used without nsec.
In this case, nsec is 0 of the default argument.
  • Loading branch information
SPRESENSE committed Jul 19, 2022
1 parent 461f3e2 commit b47e351
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ RtcTime::RtcTime(uint32_t sec, long nsec)
update();
}

RtcTime::RtcTime(int year, int month, int day, int hour, int minute, int second)
: _year(year), _month(month), _day(day),
_hour(hour), _minute(minute), _second(second)
{
RtcTime(_year, _month, _day, _hour, _minute, _second, 0);
};

RtcTime::RtcTime(int year, int month, int day, int hour, int minute, int second, long nsec)
: _nsec(nsec),
_year(year), _month(month), _day(day),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class RtcTime
* @brief Create RtcTime object
*/
RtcTime(uint32_t sec = 0, long nsec = 0);
RtcTime(int year, int month, int day, int hour = 0, int minute = 0, int second = 0);
RtcTime(int year, int month, int day, int hour = 0, int minute = 0, int second = 0, long nsec = 0);
RtcTime(const char* date, const char* time);

Expand Down

0 comments on commit b47e351

Please sign in to comment.