fix: suppress -Wuseless-conversion

`{integer} + 1` will automatically be an int, so static_cast<int>(a+1)
will be useless conversion.
This commit is contained in:
ToruNiina 2020-01-13 11:24:48 +09:00
parent 666e4cf9dc
commit 9f92916d1d

View File

@ -172,9 +172,9 @@ template<typename charT, typename traits>
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os, const local_date& date)
{
os << std::setfill('0') << std::setw(4) << static_cast<int>(date.year ) << '-';
os << std::setfill('0') << std::setw(2) << static_cast<int>(date.month + 1) << '-';
os << std::setfill('0') << std::setw(2) << static_cast<int>(date.day );
os << std::setfill('0') << std::setw(4) << static_cast<int>(date.year ) << '-';
os << std::setfill('0') << std::setw(2) << static_cast<int>(date.month) + 1 << '-';
os << std::setfill('0') << std::setw(2) << static_cast<int>(date.day ) ;
return os;
}