Skip to content

Commit

Permalink
Added missing include and remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
doxygen committed Apr 29, 2022
1 parent 120dd03 commit f4882b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/doxygen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8383,25 +8383,23 @@ static void computeTooltipTexts()
if (numThreads>1)
{
ThreadPool threadPool(numThreads);
std::vector < std::future< int > > results;
std::vector < std::future< void > > results;
// queue the work
std::atomic_int count=0;
for (const auto &kv : *Doxygen::symbolMap)
{
DefinitionMutable *dm = toDefinitionMutable(kv.second);
if (dm && !isSymbolHidden(toDefinition(dm)) && toDefinition(dm)->isLinkableInProject())
{
auto processTooltip = [dm,&count]() {
auto processTooltip = [dm]() {
dm->computeTooltip();
return count++;
};
results.emplace_back(threadPool.queue(processTooltip));
}
}
// wait for the results
for (auto &f : results)
{
auto i = f.get();
f.get();
}
}
else
Expand Down
1 change: 1 addition & 0 deletions src/message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "doxygen.h"

#include <mutex>
#include <atomic>

// globals
static QCString g_warnFormat;
Expand Down

0 comments on commit f4882b1

Please sign in to comment.