Skip to content

Commit

Permalink
Assigned result of constexpr functions to constexpr variables (bo…
Browse files Browse the repository at this point in the history
  • Loading branch information
trueqbit committed Dec 10, 2023
1 parent e386013 commit acd364a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/boost/date_time/time_parsing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ namespace date_time {
fs = _atoi64(beg->c_str());
}
#else
int precision = time_duration::num_fractional_digits();
BOOST_CXX14_CONSTEXPR int precision = time_duration::num_fractional_digits();
if(digits >= precision) {
// drop excess digits
fs = boost::lexical_cast<boost::int64_t>(beg->substr(0, precision));
Expand Down
5 changes: 2 additions & 3 deletions include/boost/date_time/time_system_counted.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@ namespace date_time {
}
static BOOST_CXX14_CONSTEXPR int_type frac_sec_per_day()
{
int_type seconds_per_day = 60*60*24;
int_type fractional_sec_per_sec(resolution_traits::res_adjust());
return seconds_per_day*fractional_sec_per_sec;
BOOST_CXX14_CONSTEXPR int_type seconds_per_day = 60*60*24;
return seconds_per_day*resolution_traits::res_adjust();
}
BOOST_CXX14_CONSTEXPR bool is_pos_infinity()const
{
Expand Down

0 comments on commit acd364a

Please sign in to comment.