Skip to content

Commit

Permalink
fix clang-tidy
Browse files Browse the repository at this point in the history
Signed-off-by: guo-shaoge <[email protected]>
  • Loading branch information
guo-shaoge committed Mar 16, 2022
1 parent ca5c714 commit a3bc0c5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions dbms/src/Common/MyTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ extern const int BAD_ARGUMENTS;
extern const int NOT_IMPLEMENTED;
} // namespace ErrorCodes

namespace
{
// day number per 400 years, from the year that year % 400 = 1
static constexpr int DAY_NUM_PER_400_YEARS = 365 * 400 + 97;
// day number per 100 years in every 400 years, from the year that year % 100 = 1
Expand All @@ -46,7 +44,6 @@ static constexpr int DAY_NUM_PER_4_YEARS = 365 * 4 + 1;
// day number per years in every 4 years
// note the day number of the last 1 years maybe DAY_NUM_PER_YEARS + 1
static constexpr int DAY_NUM_PER_YEARS = 365;
} // namespace

// adjustYear adjusts year according to y.
// See https://dev.mysql.com/doc/refman/5.7/en/two-digit-years.html
Expand Down Expand Up @@ -1240,7 +1237,7 @@ void addMonths(MyDateTime & t, Int64 months)
Int64 current_month = t.month - 1;
current_month += months;
Int64 current_year = 0;
Int64 year = (Int64)t.year;
Int64 year = static_cast<Int64>(t.year);
if (current_month >= 0)
{
current_year = current_month / 12;
Expand Down

0 comments on commit a3bc0c5

Please sign in to comment.