{
    "Function": "_reset",
    "File": "contracts/contracts/Voter.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "IGauge",
        "IVotingEscrow"
    ],
    "Internal Calls": [
        "_updateFor"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _reset(uint _tokenId) internal {\n        address[] storage _poolVote = poolVote[_tokenId];\n        uint _poolVoteCnt = _poolVote.length;\n        uint256 _totalWeight = 0;\n\n        for (uint i = 0; i < _poolVoteCnt; i ++) {\n            address _pool = _poolVote[i];\n            uint256 _votes = votes[_tokenId][_pool];\n\n            if (_votes != 0) {\n                _updateFor(gauges[_pool]);\n                weights[_pool] -= _votes;\n                votes[_tokenId][_pool] -= _votes;\n                if (_votes > 0) {\n                    _totalWeight += _votes;\n                }\n                IGauge(gauges[_pool]).setVoteStatus(IVotingEscrow(_ve).ownerOf(_tokenId), false);\n                emit Abstained(_tokenId, _votes);\n            }\n        }\n        totalWeight -= uint256(_totalWeight);\n        usedWeights[_tokenId] = 0;\n        delete poolVote[_tokenId];\n    }"
}