JANITORIAL: Simplify some code that use U32String::format

This commit is contained in:
Thierry Crozat 2020-09-08 21:23:47 +01:00
parent 54f825359f
commit c5ede297ea
4 changed files with 7 additions and 7 deletions

View file

@ -659,7 +659,7 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
endGFXTransaction();
#ifdef USE_OSD
Common::U32String message = Common::U32String::format(Common::U32String("%S: %S"),
Common::U32String message = Common::U32String::format("%S: %S",
_("Stretch mode").c_str(),
_(stretchModes[index].description).c_str()
);

View file

@ -2465,7 +2465,7 @@ void SurfaceSdlGraphicsManager::handleScalerHotkeys(int scalefactor, int scalerT
}
if (newScalerName) {
const Common::U32String message = Common::U32String::format(
Common::U32String("%S %s\n%d x %d -> %d x %d"),
"%S %s\n%d x %d -> %d x %d",
_("Active graphics filter:").c_str(),
newScalerName,
_videoMode.screenWidth, _videoMode.screenHeight,
@ -2499,13 +2499,13 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
#ifdef USE_OSD
Common::U32String message;
if (_videoMode.aspectRatioCorrection)
message = Common::U32String::format(Common::U32String("%S\n%d x %d -> %d x %d"),
message = Common::U32String::format("%S\n%d x %d -> %d x %d",
_("Enabled aspect ratio correction").c_str(),
_videoMode.screenWidth, _videoMode.screenHeight,
_hwScreen->w, _hwScreen->h
);
else
message = Common::U32String::format(Common::U32String("%S\n%d x %d -> %d x %d"),
message = Common::U32String::format("%S\n%d x %d -> %d x %d",
_("Disabled aspect ratio correction").c_str(),
_videoMode.screenWidth, _videoMode.screenHeight,
_hwScreen->w, _hwScreen->h
@ -2552,7 +2552,7 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
endGFXTransaction();
#ifdef USE_OSD
Common::U32String message = Common::U32String::format(Common::U32String("%S: %S"),
Common::U32String message = Common::U32String::format("%S: %S",
_("Stretch mode").c_str(),
_(s_supportedStretchModes[index].description).c_str()
);

View file

@ -89,7 +89,7 @@ bool AchievementsManager::setAchievement(const String &id, const String &display
if (!displayedMessage.empty() && g_system) {
U32String msg;
msg = Common::U32String::format(Common::U32String("%S\n%S"),
msg = Common::U32String::format("%S\n%S",
_("Achievement unlocked!").c_str(),
Common::U32String(displayedMessage).c_str()
);

View file

@ -2810,7 +2810,7 @@ void GlobalOptionsDialog::setupCloudTab() {
uint64 usedSpace = CloudMan.getStorageUsedSpace(_selectedStorageIndex);
Common::String usedSpaceNumber, usedSpaceUnits;
usedSpaceNumber = Common::getHumanReadableBytes(usedSpace, usedSpaceUnits);
_storageUsedSpace->setLabel(Common::U32String::format(Common::U32String("%s %S"), usedSpaceNumber.c_str(), _(usedSpaceUnits).c_str()));
_storageUsedSpace->setLabel(Common::U32String::format("%s %S", usedSpaceNumber.c_str(), _(usedSpaceUnits).c_str()));
_storageUsedSpace->setVisible(shownConnectedInfo);
}
if (_storageSyncHint) {