Skip to content

Commit

Permalink
Fixed: Update string formatting patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Sep 1, 2019
1 parent 96eb7f3 commit ee216f3
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/render/skydrawable.cpp
Expand Up @@ -131,7 +131,7 @@ struct Hemisphere
{
res::Uri const pTexUri = pTex.manifest().composeUri();
throw Error("Hemisphere::capColor",
stringf("Texture \"%s\" has no Average%2ColorAnalysis",
stringf("Texture \"%s\" has no Average%sColorAnalysis",
pTexUri.pathCStr(),
hemisphere == UpperHemisphere ? "Top" : "Bottom"));
}
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/ui/dialogs/serverinfodialog.cpp
Expand Up @@ -331,7 +331,7 @@ DE_GUI_PIMPL(ServerInfoDialog)
if (auto *pkgFile = PackageLoader::get().select(id_ver.first))
{
localVersion = Package::versionForFile(*pkgFile);
missing << Stringf("%1 " _E(s) "(you have: %s)" _E(.),
missing << Stringf("%s " _E(s) "(you have: %s)" _E(.),
pkgId.c_str(),
localVersion.fullNumber().c_str());
continue;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/updater/updateavailabledialog.cpp
Expand Up @@ -136,7 +136,7 @@ DE_GUI_PIMPL(UpdateAvailableDialog)
{
self().title().setText("Up to Date");
self().message().setText(
Stringf("The installed %1 is the latest available %2 build.",
Stringf("The installed %s is the latest available %s build.",
currentVersion.asHumanReadableText().c_str(),
(_E(b) + channel + _E(.)).c_str()));
}
Expand Down
Expand Up @@ -493,7 +493,7 @@ int InputBindingWidget::handleEvent_Privileged(event_t const &event)
stateFlags += "-inverse";
}

cmd = Stringf("bindcontrol {%1} {%2%3%4}",
cmd = Stringf("bindcontrol {%s} {%s%s%s}",
binds->controlName,
name.c_str(),
stateFlags.c_str(),
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/plugins/doom/src/m_cheat.cpp
Expand Up @@ -577,7 +577,7 @@ D_CMD(CheatWhere)
mobj_t *plrMo = plr->plr->mo;
if(!plrMo) return true;

String const text = Stringf("Map:%1 position:%2",
String const text = Stringf("Map:%s position:%s",
gfw_Session()->mapUri().asText().c_str(),
Vec3d(plrMo->origin).asText().c_str());
P_SetMessageWithFlags(plr, text, LMF_NO_HIDE);
Expand Down
1 change: 1 addition & 0 deletions doomsday/libs/core/src/data/string.cpp
Expand Up @@ -432,6 +432,7 @@ String &String::replace(const RegExp &before, const CString &after)
RegExpMatch found;
while (before.match(*this, found))
{
DE_ASSERT(found.end() > found.begin());
const iRangecc prefix{remaining.start, found.begin()};
appendRange_String(result.i_str(), &prefix);
appendRange_String(result.i_str(), &newTerm);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libs/doomsday/src/console/var.cpp
Expand Up @@ -675,7 +675,7 @@ static Value *Function_Console_Set(Context &, Function::ArgumentValues const &ar
if (!var)
{
throw Error("Function_Console_Set",
stringf("Unknown console variable: %1", name.c_str()));
stringf("Unknown console variable: %s", name.c_str()));
}

Value const &value = *args.at(1);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libs/doomsday/src/game.cpp
Expand Up @@ -532,7 +532,7 @@ String Game::filesAsText(int rflags, bool withStatus) const
}

// Format the resource name list.
text += Stringf(_E(>) "%1%2",
text += Stringf(_E(>) "%s%s",
!resourceFound? _E(D) : "",
String::join(manifest.names(), _E(l) " or " _E(.)).c_str());

Expand Down
2 changes: 1 addition & 1 deletion doomsday/libs/doomsday/src/resource/databundle.cpp
Expand Up @@ -1432,7 +1432,7 @@ StringList DataBundle::gameTags()

String DataBundle::anyGameTagPattern()
{
return Stringf("\\b(%1)\\b", String::join(gameTags(), "|").c_str());
return Stringf("\\b(%s)\\b", String::join(gameTags(), "|").c_str());
}

String DataBundle::cleanIdentifier(String const &text)
Expand Down

0 comments on commit ee216f3

Please sign in to comment.