Skip to content

Commit

Permalink
SA: reduce the scope of some variables
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-iob committed Jun 12, 2024
1 parent cac7c56 commit bcfe91a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/SA/PQueue.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,6 @@ void MinPQueue<T, T1>::heapify(

// Local variables
int L, R, idummy, imap;
T dummy;
T1 dummy2;

// Counters
// none
Expand All @@ -358,13 +356,13 @@ void MinPQueue<T, T1>::heapify(

// Move up-heap
if (idummy != i) {
dummy = keys[i];
T dummy = keys[i];
keys[i] = keys[idummy];
keys[idummy] = dummy;
if (use_labels) {
dummy2 = labels[i];
T1 dummy2 = labels[i];
labels[i] = labels[idummy];
labels[idummy] = dummy2;
labels[idummy] = std::move(dummy2);
}
if (map != NULL) {
imap = (*map)[i][0];
Expand Down

0 comments on commit bcfe91a

Please sign in to comment.