Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

bug setActiveConnection always error #1940

Merged
merged 4 commits into from Nov 26, 2019

Conversation

wanyvic
Copy link
Contributor

@wanyvic wanyvic commented Nov 21, 2019

No description provided.

@MariusVanDerWijden
Copy link
Collaborator

MariusVanDerWijden commented Nov 21, 2019

Isn't this equal to this? Would save us the found bool

    for (size_t idx = 0; idx < m_Settings.connections.size(); idx++)
        if (boost::iequals(m_Settings.connections[idx]->str(), _connstring))
        {
            setActiveConnectionCommon(idx);
            return;
        }
    throw std::runtime_error("Not found.");

Cool find by the way, Don't know how this could slide by

@wanyvic
Copy link
Contributor Author

wanyvic commented Nov 21, 2019

Isn't this equal to this? Would save us the found bool

    for (size_t idx = 0; idx < m_Settings.connections.size(); idx++)
        if (boost::iequals(m_Settings.connections[idx]->str(), _connstring))
        {
            setActiveConnectionCommon(idx);
            return;
        }
    throw std::runtime_error("Not found.");

Cool find by the way, Don't know how this could slide by

much better

@MariusVanDerWijden MariusVanDerWijden merged commit 782292d into ethereum-mining:master Nov 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants