{"action":"created","issue":{"url":"https://api.github.com/repos/benhoyt/inih/issues/53","repository_url":"https://api.github.com/repos/benhoyt/inih","labels_url":"https://api.github.com/repos/benhoyt/inih/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/benhoyt/inih/issues/53/comments","events_url":"https://api.github.com/repos/benhoyt/inih/issues/53/events","html_url":"https://github.com/benhoyt/inih/pull/53","id":176186677,"number":53,"title":"[INIReader] class now using constant reference as method arguments.","user":{"login":"TheVice","id":5098854,"avatar_url":"https://avatars.githubusercontent.com/u/5098854?v=3","gravatar_id":"","url":"https://api.github.com/users/TheVice","html_url":"https://github.com/TheVice","followers_url":"https://api.github.com/users/TheVice/followers","following_url":"https://api.github.com/users/TheVice/following{/other_user}","gists_url":"https://api.github.com/users/TheVice/gists{/gist_id}","starred_url":"https://api.github.com/users/TheVice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheVice/subscriptions","organizations_url":"https://api.github.com/users/TheVice/orgs","repos_url":"https://api.github.com/users/TheVice/repos","events_url":"https://api.github.com/users/TheVice/events{/privacy}","received_events_url":"https://api.github.com/users/TheVice/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-10T15:58:22Z","updated_at":"2016-09-12T19:37:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/benhoyt/inih/pulls/53","html_url":"https://github.com/benhoyt/inih/pull/53","diff_url":"https://github.com/benhoyt/inih/pull/53.diff","patch_url":"https://github.com/benhoyt/inih/pull/53.patch"},"body":"Hello.\r\n\r\nI propose to change argument types from direct type to constant reference so it will be good from performance side as string do not copy at method call.\r\nGet method also can return constant reference so no temporary string will not be provided, it copy already to string that expected to take data from Get method.\r\n\r\nThank you.\r\n\r\nP.S.\r\nBy the way, if you interesting about other change that can be provide for this class (most expected that compiler support C++ 11) I save my view at [separate branch](https://github.com/TheVice/inih/tree/vicemaster) at repository fork."},"comment":{"url":"https://api.github.com/repos/benhoyt/inih/issues/comments/246465765","html_url":"https://github.com/benhoyt/inih/pull/53#issuecomment-246465765","issue_url":"https://api.github.com/repos/benhoyt/inih/issues/53","id":246465765,"user":{"login":"just6979","id":653171,"avatar_url":"https://avatars.githubusercontent.com/u/653171?v=3","gravatar_id":"","url":"https://api.github.com/users/just6979","html_url":"https://github.com/just6979","followers_url":"https://api.github.com/users/just6979/followers","following_url":"https://api.github.com/users/just6979/following{/other_user}","gists_url":"https://api.github.com/users/just6979/gists{/gist_id}","starred_url":"https://api.github.com/users/just6979/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/just6979/subscriptions","organizations_url":"https://api.github.com/users/just6979/orgs","repos_url":"https://api.github.com/users/just6979/repos","events_url":"https://api.github.com/users/just6979/events{/privacy}","received_events_url":"https://api.github.com/users/just6979/received_events","type":"User","site_admin":false},"created_at":"2016-09-12T19:37:48Z","updated_at":"2016-09-12T19:37:48Z","body":"The const ref on the inputs is a good practice, since inih doesn't need its own copy of the input string and also won't be changing it.\r\n\r\nHowever, the const ref on the returned string is not good, since we probably want the calling app to \"own\" the returned string, and be able to manipulate it if needed. With a reference, inih \"owns\" it, and we have to rely on inih to maintain the memory for it, which is not ideal (limits potential internal changes, breaks encapsulation)"}}
{"actor":{"display_login":"just6979"}}