Skip to content

Commit

Permalink
fix(#4191): fmt update
Browse files Browse the repository at this point in the history
  • Loading branch information
vomikan committed Feb 8, 2022
1 parent 03d5217 commit d0a3f5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/model/Model_Currency.cpp
@@ -1,6 +1,6 @@
/*******************************************************
Copyright (C) 2013,2014 Guan Lisheng (guanlisheng@gmail.com)
Copyright (C) 2013 - 2021 Nikolay Akimov
Copyright (C) 2013 - 2022 Nikolay Akimov
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -26,7 +26,7 @@
#include "util.h"

#include <fmt/core.h>
#include <fmt/locale.h>
#include <fmt/format.h>

Model_Currency::Model_Currency()
: Model<DB_Table_CURRENCYFORMATS_V1>()
Expand Down
7 changes: 4 additions & 3 deletions src/optionsettingsgeneral.cpp
@@ -1,5 +1,6 @@
/*******************************************************
Copyright (C) 2014 Stefano Giorgio
Copyright (C) 2016, 2017, 2020 - 2022 Nikolay Akimov
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -25,7 +26,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include <wx/spinctrl.h>
#include <fmt/core.h>
#include <fmt/locale.h>
#include <fmt/format.h>

/*******************************************************/
wxBEGIN_EVENT_TABLE(OptionSettingsGeneral, wxPanel)
Expand Down Expand Up @@ -313,9 +314,9 @@ bool OptionSettingsGeneral::doFormatDoubleValue(const wxString& locale, wxString
auto test = fmt::format(std::locale(locale.c_str()), "{:L}", value);

wxString cents;
wxRegEx pattern(R"([^0-9][0-9]{2})");
wxRegEx pattern(R"(([,.][0-9]{2})[0-9]+$)");
if (pattern.Matches(test)) {
cents = pattern.GetMatch(test, 0);
cents = pattern.GetMatch(test, 1);
}
else
return false;
Expand Down

0 comments on commit d0a3f5c

Please sign in to comment.