diff options
author | George Hazan <ghazan@miranda.im> | 2019-03-04 12:33:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-03-04 12:33:39 +0300 |
commit | ec99c7538e249e839676052d6cd16f8927b7fcb6 (patch) | |
tree | 590728ea87bf60b680e6c91ed6fc38c07cff6952 /protocols | |
parent | fd2f3f39e5e68db4635736807581d320d4b3b982 (diff) |
code optimization
Diffstat (limited to 'protocols')
-rwxr-xr-x | protocols/JabberG/src/jabber_iqid.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 5fa6333525..988278fca4 100755 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -403,12 +403,9 @@ void CJabberProto::OnIqResultGetRoster(const TiXmlElement *iqNode, CJabberIqInfo // check group delimiters
if (item->group && szGroupDelimiter) {
- while (char *szPos = strstr(item->group, szGroupDelimiter)) {
- *szPos = 0;
- szPos += mir_strlen(szGroupDelimiter);
- CMStringA szNewGroup(FORMAT, "%s\\%s", item->group, szPos);
- replaceStr(item->group, szNewGroup.Detach());
- }
+ CMStringA szNewGroup(item->group);
+ szNewGroup.Replace(szGroupDelimiter, "\\");
+ replaceStr(item->group, szNewGroup.Detach());
}
if (name != nullptr) {
|