mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 20:10:06 +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
|
|
@ -4,7 +4,6 @@
|
|||
#include <scwx/common/sites.hpp>
|
||||
#include <scwx/util/logger.hpp>
|
||||
|
||||
#include <format>
|
||||
#include <shared_mutex>
|
||||
#include <unordered_map>
|
||||
|
||||
|
|
@ -118,18 +117,18 @@ std::string RadarSite::location_name() const
|
|||
|
||||
if (p->country_ == "USA")
|
||||
{
|
||||
locationName = std::format("{}, {}", p->place_, p->state_);
|
||||
locationName = fmt::format("{}, {}", p->place_, p->state_);
|
||||
}
|
||||
else if (std::all_of(p->state_.cbegin(),
|
||||
p->state_.cend(),
|
||||
[](char c) { return std::isdigit(c); }))
|
||||
{
|
||||
locationName = std::format("{}, {}", p->place_, p->country_);
|
||||
locationName = fmt::format("{}, {}", p->place_, p->country_);
|
||||
}
|
||||
else
|
||||
{
|
||||
locationName =
|
||||
std::format("{}, {}, {}", p->place_, p->state_, p->country_);
|
||||
fmt::format("{}, {}, {}", p->place_, p->state_, p->country_);
|
||||
}
|
||||
|
||||
return locationName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue