C++, skip adding already used old-style ids.

See michaeljones/breathe#266.
This commit is contained in:
Jakob Lykke Andersen 2016-06-14 15:55:01 +09:00
parent 2d20e337b3
commit c0df9205e6

View File

@ -3759,8 +3759,14 @@ class CPPObject(ObjectDescription):
else:
# print("[CPP] non-unique name:", name)
pass
for id in ids:
if id: # is None when the element didn't exist in that version
# always add the newest id
assert newestId
signode['ids'].append(newestId)
# only add compatibility ids when there are no conflicts
for id in ids[1:]:
if not id: # is None when the element didn't exist in that version
continue
if id not in self.state.document.ids:
signode['ids'].append(id)
signode['first'] = (not self.names) # hmm, what is this abound?
self.state.document.note_explicit_target(signode)