aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Kaijser <martijn@xbmc.org>2019-01-12 16:28:51 +0100
committerGitHub <noreply@github.com>2019-01-12 16:28:51 +0100
commit2e77047ed1788dd912cea242f79b0e82bb750704 (patch)
tree220feb8be4c066a821b6a26437c3e3fd5a84962f
parent66d8c52697b6733c9b35cff56131b5e2679ab233 (diff)
parentad4ed4f66eb05f0dea30945bb538865aabd93ff1 (diff)
Merge pull request #15224 from fritsch/libfmt
DisplaySettings: Change %.02f to %.2f to workaround a crash in libfmt53
-rw-r--r--xbmc/input/joysticks/generic/ButtonMapping.cpp2
-rw-r--r--xbmc/settings/DisplaySettings.cpp2
-rw-r--r--xbmc/utils/SortUtils.cpp2
-rw-r--r--xbmc/utils/StringUtils.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/xbmc/input/joysticks/generic/ButtonMapping.cpp b/xbmc/input/joysticks/generic/ButtonMapping.cpp
index 58279a527c..a5af0744b5 100644
--- a/xbmc/input/joysticks/generic/ButtonMapping.cpp
+++ b/xbmc/input/joysticks/generic/ButtonMapping.cpp
@@ -531,7 +531,7 @@ CAxisDetector& CButtonMapping::GetAxis(unsigned int axisIndex,
}
// Report axis
- CLog::Log(LOGDEBUG, "Axis %u discovered at position %.04f after %lu frames",
+ CLog::Log(LOGDEBUG, "Axis %u discovered at position %.4f after %lu frames",
axisIndex, position, static_cast<unsigned long>(m_frameCount));
m_axes.insert(std::make_pair(axisIndex, CAxisDetector(this, axisIndex, config)));
diff --git a/xbmc/settings/DisplaySettings.cpp b/xbmc/settings/DisplaySettings.cpp
index a5c00dd05e..49f9137376 100644
--- a/xbmc/settings/DisplaySettings.cpp
+++ b/xbmc/settings/DisplaySettings.cpp
@@ -738,7 +738,7 @@ void CDisplaySettings::SettingOptionsRefreshRatesFiller(SettingConstPtr setting,
std::string screenmode = GetStringFromResolution((RESOLUTION)refreshrate->ResInfo_Index, refreshrate->RefreshRate);
if (!match && StringUtils::EqualsNoCase(std::static_pointer_cast<const CSettingString>(setting)->GetValue(), screenmode))
match = true;
- list.push_back(std::make_pair(StringUtils::Format("%.02f", refreshrate->RefreshRate), screenmode));
+ list.push_back(std::make_pair(StringUtils::Format("%.2f", refreshrate->RefreshRate), screenmode));
}
if (!match)
diff --git a/xbmc/utils/SortUtils.cpp b/xbmc/utils/SortUtils.cpp
index 3b4cad4e1d..c579ff0e63 100644
--- a/xbmc/utils/SortUtils.cpp
+++ b/xbmc/utils/SortUtils.cpp
@@ -349,7 +349,7 @@ std::string ByVideoCodec(SortAttribute attributes, const SortItem &values)
std::string ByVideoAspectRatio(SortAttribute attributes, const SortItem &values)
{
- return StringUtils::Format("%.03f %s", values.at(FieldVideoAspectRatio).asFloat(), ByLabel(attributes, values).c_str());
+ return StringUtils::Format("%.3f %s", values.at(FieldVideoAspectRatio).asFloat(), ByLabel(attributes, values).c_str());
}
std::string ByAudioChannels(SortAttribute attributes, const SortItem &values)
diff --git a/xbmc/utils/StringUtils.cpp b/xbmc/utils/StringUtils.cpp
index 9c2663edb7..c08b94e3e1 100644
--- a/xbmc/utils/StringUtils.cpp
+++ b/xbmc/utils/StringUtils.cpp
@@ -964,7 +964,7 @@ std::string StringUtils::SizeToString(int64_t size)
}
if (!i)
- strLabel = StringUtils::Format("%.0lf B", s);
+ strLabel = StringUtils::Format("%.lf B", s);
else if (i == ARRAY_SIZE(prefixes))
{
if (s >= 1000.0)