Skip to content

Commit 6540585

Browse files
committed
Fix non-reproducible search index
1 parent c87ad3c commit 6540585

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/searchindex_js.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,11 @@ void createJavaScriptSearchIndex()
487487
for (auto &[name,symList] : sii.symbolMap) // for each symbol in the index
488488
{
489489
// sort the symbols (first on search term, and then on full name)
490-
std::sort(symList.begin(),
490+
//
491+
// `std::stable_sort` is used here due to reproducibility issues
492+
// on key collisions
493+
// https://github.com/doxygen/doxygen/issues/10445
494+
std::stable_sort(symList.begin(),
491495
symList.end(),
492496
[](const auto &t1,const auto &t2)
493497
{

0 commit comments

Comments
 (0)