mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Do not add symbols twice to Encoding::symbolsList()
Also sort the list properly. Fixes #10644
This commit is contained in:
parent
24021a425e
commit
74c10e06aa
@ -266,9 +266,13 @@ vector<char_type> Encoding::symbolsList() const
|
||||
symbols.push_back(c);
|
||||
// add all encodable characters
|
||||
copy(encodable_.begin(), encodable_.end(), back_inserter(symbols));
|
||||
// now the ones from the unicodesymbols file
|
||||
for (pair<char_type, CharInfo> const & elem : unicodesymbols)
|
||||
// now the ones from the unicodesymbols file that are not already there
|
||||
for (pair<char_type, CharInfo> const & elem : unicodesymbols) {
|
||||
if (find(symbols.begin(), symbols.end(), elem.first) == symbols.end())
|
||||
symbols.push_back(elem.first);
|
||||
}
|
||||
// finally, sort the vector
|
||||
sort(symbols.begin(), symbols.end());
|
||||
return symbols;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user