HomePhabricator

Prefer 'unsigned int' for loop index variables tested against ::size()
faf705a42a05Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Prefer 'unsigned int' for loop index variables tested against ::size()

C++ STL ::size() generally returns unsigned, which implies that "int idx"
style of loop variable will generate a signed-vs-unsigned comparison warning
when testing the loop exit condition "idx < blah.size()"

Update areas of the bitcoin code where loop variables may be more properly and
correctly defined as unsigned.

Details

Provenance
Jeff Garzik <jgarzik@exmulti.com>Authored on Apr 22 2012, 17:22
Jeff Garzik <jgarzik@redhat.com>Committed on Apr 22 2012, 17:22
schancelPushed on Jan 5 2018, 21:58
schancelPushed on Jan 5 2018, 21:39
schancelPushed on Jan 5 2018, 21:17
Parents
rSTAGING457661f64000: Merge pull request #1124 from sipa/rpcobj3
Branches
Unknown
Tags
Unknown

Event Timeline

Jeff Garzik <jgarzik@redhat.com> committed rSTAGINGfaf705a42a05: Prefer 'unsigned int' for loop index variables tested against ::size() (authored by Jeff Garzik <jgarzik@exmulti.com>).Apr 22 2012, 17:22