Fix warning about unused variable
This commit is contained in:
parent
38ee16ae9c
commit
4f4391193c
1 changed files with 5 additions and 2 deletions
|
@ -477,11 +477,13 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
|
||||||
logger->startWork();
|
logger->startWork();
|
||||||
Roots roots = store->findRoots();
|
Roots roots = store->findRoots();
|
||||||
logger->stopWork();
|
logger->stopWork();
|
||||||
|
|
||||||
|
// Pre-compute roots length using same algo as below.
|
||||||
size_t total_length = 0;
|
size_t total_length = 0;
|
||||||
bool hasMemoryLink;
|
bool hasMemoryLink;
|
||||||
for (auto & [target, links] : roots) {
|
for (auto & root : roots) {
|
||||||
hasMemoryLink = false;
|
hasMemoryLink = false;
|
||||||
for (auto & link : links) {
|
for (auto & link : root.second) {
|
||||||
if (link.rfind("{memory:", 0) == 0) {
|
if (link.rfind("{memory:", 0) == 0) {
|
||||||
if (hasMemoryLink) continue;
|
if (hasMemoryLink) continue;
|
||||||
++total_length;
|
++total_length;
|
||||||
|
@ -491,6 +493,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
to << total_length;
|
to << total_length;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
for (auto & [target, links] : roots) {
|
for (auto & [target, links] : roots) {
|
||||||
|
|
Loading…
Reference in a new issue