{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/11149","repository_url":"https://api.github.com/repos/bitcoin/bitcoin","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/11149/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/11149/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/11149/events","html_url":"https://github.com/bitcoin/bitcoin/pull/11149","id":253031970,"number":11149,"title":"Use prefix instead of postfix increment/decrement for non-trivial typ…","user":{"login":"danra","id":84245,"avatar_url":"https://avatars3.githubusercontent.com/u/84245?v=4","gravatar_id":"","url":"https://api.github.com/users/danra","html_url":"https://github.com/danra","followers_url":"https://api.github.com/users/danra/followers","following_url":"https://api.github.com/users/danra/following{/other_user}","gists_url":"https://api.github.com/users/danra/gists{/gist_id}","starred_url":"https://api.github.com/users/danra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danra/subscriptions","organizations_url":"https://api.github.com/users/danra/orgs","repos_url":"https://api.github.com/users/danra/repos","events_url":"https://api.github.com/users/danra/events{/privacy}","received_events_url":"https://api.github.com/users/danra/received_events","type":"User","site_admin":false},"labels":[{"id":135961,"url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Refactoring","name":"Refactoring","color":"E6F6D6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-08-25T22:25:22Z","updated_at":"2017-08-26T09:14:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/11149","html_url":"https://github.com/bitcoin/bitcoin/pull/11149","diff_url":"https://github.com/bitcoin/bitcoin/pull/11149.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/11149.patch"},"body":"…es where the result isn't used (and for trivial types as well in the changed files, for consistency).\r\n\r\nFollow Scott Meyers' advice in his More Effective C++ book, as well as cppcheck's performance messages, and use prefix instead of postfix increment/decrement for objects of non-trivial type, whenever the result of the increment isn't used, to avoid possible extra copies and maximize performance.\r\n\r\nAll the modified files fix this for some objects of non-trivial type. Increments/decrements of trivial types in these files were also converted to prefix instead of postfix (wherever the result isn't used) for consistency."},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/325106336","html_url":"https://github.com/bitcoin/bitcoin/pull/11149#issuecomment-325106336","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/11149","id":325106336,"user":{"login":"promag","id":3534524,"avatar_url":"https://avatars1.githubusercontent.com/u/3534524?v=4","gravatar_id":"","url":"https://api.github.com/users/promag","html_url":"https://github.com/promag","followers_url":"https://api.github.com/users/promag/followers","following_url":"https://api.github.com/users/promag/following{/other_user}","gists_url":"https://api.github.com/users/promag/gists{/gist_id}","starred_url":"https://api.github.com/users/promag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/promag/subscriptions","organizations_url":"https://api.github.com/users/promag/orgs","repos_url":"https://api.github.com/users/promag/repos","events_url":"https://api.github.com/users/promag/events{/privacy}","received_events_url":"https://api.github.com/users/promag/received_events","type":"User","site_admin":false},"created_at":"2017-08-26T09:14:28Z","updated_at":"2017-08-26T09:14:28Z","body":"NACK, although it's a better code and all, unless you show numbers of performance increase."}}
{"actor":{"display_login":"promag"}}