mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Ref T270, push front for sequence and unified "insert" -> "push_back"
Remark: "CSequence::insert" is a synonym "push_back". This makes it clearer that push_back is used.
This commit is contained in:
@@ -190,7 +190,7 @@ namespace BlackCore
|
||||
//! \fixme KB 2017-11 maybe this code can be encapsulated somewhere
|
||||
CApplicationInfoList apps = CApplication::getRunningApplications();
|
||||
const CApplicationInfo myself = CApplication::instance()->getApplicationInfo();
|
||||
if (!apps.contains(myself)) { apps.insert(myself); }
|
||||
if (!apps.contains(myself)) { apps.push_back(myself); }
|
||||
const bool ok = CFileUtils::writeStringToLockedFile(apps.toJsonString(), CFileUtils::appendFilePaths(swiftDataRoot(), "apps.json"));
|
||||
if (!ok) { CLogMessage(static_cast<CApplication *>(nullptr)).error("Failed to write to application list file"); }
|
||||
return ok;
|
||||
|
||||
Reference in New Issue
Block a user