Skip to content

Commit

Permalink
replace const with constexpr in initialization of stable version strings
Browse files Browse the repository at this point in the history
  • Loading branch information
farmerpiki committed Sep 6, 2024
1 parent 43aba32 commit 26a150f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -880,8 +880,8 @@ class cmdline_processor
-> void
{
help_requested = true;
const std::string_view a = __DATE__;
const std::string_view b = __TIME__;
constexpr std::string_view a = __DATE__;
constexpr std::string_view b = __TIME__;
std::unordered_map<std::string_view, char> m = { {"Jan",'1'}, {"Feb",'2'}, {"Mar",'3'}, {"Apr",'4'}, {"May",'5'}, {"Jun",'6'}, {"Jul",'7'}, {"Aug",'8'}, {"Sep",'9'}, {"Oct",'A'}, {"Nov",'B'}, {"Dec",'C'} };

auto stamp = std::to_string(atoi(&a[9])-15);
Expand Down

0 comments on commit 26a150f

Please sign in to comment.