Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos. #213

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/utils/nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,18 +312,18 @@ FeatherNode Nodes::pickEligibleNode() {
return rtn;
}

QVector<int> node_indeces;
QVector<int> node_indices;
int i = 0;
for (const auto &node: nodes) {
node_indeces.push_back(i);
node_indices.push_back(i);
i++;
}
unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
std::shuffle(node_indeces.begin(), node_indeces.end(), std::default_random_engine(seed));
std::shuffle(node_indices.begin(), node_indices.end(), std::default_random_engine(seed));

// Pick random eligible node
int mode_height = this->modeHeight(nodes);
for (int index : node_indeces) {
for (int index : node_indices) {
const FeatherNode &node = nodes.at(index);

// This may fail to detect bad nodes if cached nodes are used
Expand Down Expand Up @@ -359,7 +359,7 @@ FeatherNode Nodes::pickEligibleNode() {

// All nodes tried, and none eligible
// Don't show node exhaustion warning if single custom node is used
if (wsMode || node_indeces.size() > 1) {
if (wsMode || node_indices.size() > 1) {
this->exhausted();
}
return rtn;
Expand Down