-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Remove unused variables #9532
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
Remove unused variables #9532
Conversation
9de96a1
to
b32a6ff
Compare
b32a6ff
to
180df23
Compare
Can you please rename the commits to remove the [trivial], as that tag is really only used when a PR doesn't touch any code. |
I have used "Trivial: " in the beginning of the message of some commits that changed code in trivial ways, I didn't know that policy. When I don't touch code at all I tend to just use "Doc: ", but I did these things on my own, if we have a place describing these kind of best practices I missed it, can you link to it? |
ACK 180df23 |
@@ -54,11 +54,8 @@ double CAddrInfo::GetChance(int64_t nNow) const | |||
{ | |||
double fChance = 1.0; | |||
|
|||
int64_t nSinceLastSeen = nNow - nTime; | |||
int64_t nSinceLastTry = nNow - nLastTry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe initializing nSinceLastTry
and the following if
statement can be collapsed into a call to std::max()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! I'll take that in another PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 180df23 |
180df23
to
90fd29b
Compare
@fanquake Removed |
I believe this one should be ready to merge. Please let me know if any adjustments are needed and I'll fix it right away! :-) |
utACK 90fd29b |
Any sponsor who has time to take a look at this hopefully trivial PR? :-) |
utACK 90fd29b |
No description provided.