File tree 1 file changed +6
-6
lines changed
core/indigo-core/molecule/src
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -3002,28 +3002,28 @@ void MolfileLoader::_fillSGroupsParentIndices()
3002
3002
{
3003
3003
MoleculeSGroups& sgroups = _bmol->sgroups ;
3004
3004
3005
- MultiMap <int , int > indices;
3005
+ std::multimap <int , int > indices;
3006
3006
// original index can be arbitrary, sometimes key is used multiple times
3007
3007
3008
3008
for (auto i = sgroups.begin (); i != sgroups.end (); i++)
3009
3009
{
3010
3010
SGroup& sgroup = sgroups.getSGroup (i);
3011
- indices.insert (sgroup.original_group , i);
3011
+ indices.emplace (sgroup.original_group , i);
3012
3012
}
3013
3013
3014
3014
// TODO: replace parent_group with parent_idx
3015
3015
for (auto i = sgroups.begin (); i != sgroups.end (); i = sgroups.next (i))
3016
3016
{
3017
3017
SGroup& sgroup = sgroups.getSGroup (i);
3018
- const auto & set = indices.get (sgroup.parent_group );
3019
- if (set.size () == 1 )
3018
+ if (indices.count (sgroup.parent_group ) == 1 )
3020
3019
{
3020
+ const auto it = indices.find (sgroup.parent_group );
3021
3021
// TODO: check fix
3022
- auto parent_idx = set. key (set. begin ()) ;
3022
+ auto parent_idx = it-> second ;
3023
3023
SGroup& parent_sgroup = sgroups.getSGroup (parent_idx);
3024
3024
if (&sgroup != &parent_sgroup)
3025
3025
{
3026
- sgroup.parent_idx = set. key (set. begin ()) ;
3026
+ sgroup.parent_idx = it-> second ;
3027
3027
}
3028
3028
else
3029
3029
{
You can’t perform that action at this time.
0 commit comments