mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 19:00:04 +00:00
GCC doesn't implement <format> yet, use fmt
This commit is contained in:
parent
593010acc2
commit
31db9a4315
12 changed files with 27 additions and 28 deletions
|
|
@ -84,7 +84,7 @@ std::vector<std::string> Ugc::fips_ids() const
|
|||
{
|
||||
for (auto& id : fipsIdList.second)
|
||||
{
|
||||
fipsIds.push_back(std::format("{}{}{:03}",
|
||||
fipsIds.push_back(fmt::format("{}{}{:03}",
|
||||
fipsIdList.first,
|
||||
ugcFormatMap_.left.at(p->format_),
|
||||
id));
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
#include <scwx/common/geographic.hpp>
|
||||
#include <scwx/common/characters.hpp>
|
||||
|
||||
#include <format>
|
||||
#include <numbers>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace common
|
||||
|
|
@ -95,7 +96,7 @@ static std::string GetDegreeString(double degrees,
|
|||
{
|
||||
case DegreeStringType::Decimal:
|
||||
degreeString =
|
||||
std::format("{:.6f}{}{}", degrees, Unicode::kDegree, suffix);
|
||||
fmt::format("{:.6f}{}{}", degrees, Unicode::kDegree, suffix);
|
||||
break;
|
||||
case DegreeStringType::DegreesMinutesSeconds:
|
||||
{
|
||||
|
|
@ -103,7 +104,7 @@ static std::string GetDegreeString(double degrees,
|
|||
degrees = (degrees - dd) * 60.0;
|
||||
uint32_t mm = static_cast<uint32_t>(degrees);
|
||||
double ss = (degrees - mm) * 60.0;
|
||||
degreeString = std::format(
|
||||
degreeString = fmt::format(
|
||||
"{}{} {}' {:.2f}\"{}", dd, Unicode::kDegree, mm, ss, suffix);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue