{"action":"created","comment":{"url":"https://api.github.com/repos/OpenOrienteering/mapper/pulls/comments/217611609","pull_request_review_id":155366521,"id":217611609,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzYxMTYwOQ==","diff_hunk":"@@ -249,11 +249,13 @@ class OcdFileExport : public Exporter\n \t        const LineSymbol* double_line );\n \t\n \t\n-\tvoid exportSymbolIcon(const Symbol* symbol, Ocd::IconV8& icon);\n+public:\n+\tstatic void exportSymbolIcon(const Map* map, const Symbol* symbol, Ocd::IconV8& icon);\n \t\n-\tvoid exportSymbolIcon(const Symbol* symbol, Ocd::IconV9& icon);\n+\tstatic void exportSymbolIcon(const Map* map, const Symbol* symbol, Ocd::IconV9& icon);","path":"src/fileformats/ocd_file_export.h","position":9,"original_position":9,"commit_id":"24eda802532872d81bab6ad2126697902bae78c3","original_commit_id":"d625ec00f9beb1342dc8ede28b6ada01f87e8598","user":{"login":"dg0yt","id":13567791,"node_id":"MDQ6VXNlcjEzNTY3Nzkx","avatar_url":"https://avatars3.githubusercontent.com/u/13567791?v=4","gravatar_id":"","url":"https://api.github.com/users/dg0yt","html_url":"https://github.com/dg0yt","followers_url":"https://api.github.com/users/dg0yt/followers","following_url":"https://api.github.com/users/dg0yt/following{/other_user}","gists_url":"https://api.github.com/users/dg0yt/gists{/gist_id}","starred_url":"https://api.github.com/users/dg0yt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dg0yt/subscriptions","organizations_url":"https://api.github.com/users/dg0yt/orgs","repos_url":"https://api.github.com/users/dg0yt/repos","events_url":"https://api.github.com/users/dg0yt/events{/privacy}","received_events_url":"https://api.github.com/users/dg0yt/received_events","type":"User","site_admin":false},"body":"Returning by value instead of passing an output parameter makes it impossible to simply overload the function name for different icon types. We will either have to use templates, or we may use an extra type, moving the export implementation to conversion operators:\r\n\r\n~~~\r\nstruct OcdIcon\r\n{\r\n\tconst Map& map;\r\n\tconst Symbol& symbol;\r\n\t\r\n\toperator Ocd::IconV8() const;\r\n\toperator Ocd::IconV9() const;\r\n};\r\n\r\n...\r\n\r\nocd_base_symbol.icon = OcdIcon{map, symbol};\r\n~~~\r\n\r\nI admit there is some beauty in this approach: It eliminates static functions from OcdFileExport, and `OcdIcon` totally encapsulates functionality which might be used and tested separately.","created_at":"2018-09-14T06:30:10Z","updated_at":"2018-09-14T06:30:10Z","html_url":"https://github.com/OpenOrienteering/mapper/pull/1129#discussion_r217611609","pull_request_url":"https://api.github.com/repos/OpenOrienteering/mapper/pulls/1129","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/OpenOrienteering/mapper/pulls/comments/217611609"},"html":{"href":"https://github.com/OpenOrienteering/mapper/pull/1129#discussion_r217611609"},"pull_request":{"href":"https://api.github.com/repos/OpenOrienteering/mapper/pulls/1129"}},"in_reply_to_id":212892215},"pull_request":{"url":"https://api.github.com/repos/OpenOrienteering/mapper/pulls/1129","id":210351752,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMzUxNzUy","html_url":"https://github.com/OpenOrienteering/mapper/pull/1129","diff_url":"https://github.com/OpenOrienteering/mapper/pull/1129.diff","patch_url":"https://github.com/OpenOrienteering/mapper/pull/1129.patch","issue_url":"https://api.github.com/repos/OpenOrienteering/mapper/issues/1129","number":1129,"state":"open","locked":false,"title":"Custom icon support","user":{"login":"dg0yt","id":13567791,"node_id":"MDQ6VXNlcjEzNTY3Nzkx","avatar_url":"https://avatars3.githubusercontent.com/u/13567791?v=4","gravatar_id":"","url":"https://api.github.com/users/dg0yt","html_url":"https://github.com/dg0yt","followers_url":"https://api.github.com/users/dg0yt/followers","following_url":"https://api.github.com/users/dg0yt/following{/other_user}","gists_url":"https://api.github.com/users/dg0yt/gists{/gist_id}","starred_url":"https://api.github.com/users/dg0yt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dg0yt/subscriptions","organizations_url":"https://api.github.com/users/dg0yt/orgs","repos_url":"https://api.github.com/users/dg0yt/repos","events_url":"https://api.github.com/users/dg0yt/events{/privacy}","received_events_url":"https://api.github.com/users/dg0yt/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-23T07:14:50Z","updated_at":"2018-09-14T06:30:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c93316889e460168a9f2cb21ce613aafb55c9d73","assignee":{"login":"dg0yt","id":13567791,"node_id":"MDQ6VXNlcjEzNTY3Nzkx","avatar_url":"https://avatars3.githubusercontent.com/u/13567791?v=4","gravatar_id":"","url":"https://api.github.com/users/dg0yt","html_url":"https://github.com/dg0yt","followers_url":"https://api.github.com/users/dg0yt/followers","following_url":"https://api.github.com/users/dg0yt/following{/other_user}","gists_url":"https://api.github.com/users/dg0yt/gists{/gist_id}","starred_url":"https://api.github.com/users/dg0yt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dg0yt/subscriptions","organizations_url":"https://api.github.com/users/dg0yt/orgs","repos_url":"https://api.github.com/users/dg0yt/repos","events_url":"https://api.github.com/users/dg0yt/events{/privacy}","received_events_url":"https://api.github.com/users/dg0yt/received_events","type":"User","site_admin":false},"assignees":[{"login":"dg0yt","id":13567791,"node_id":"MDQ6VXNlcjEzNTY3Nzkx","avatar_url":"https://avatars3.githubusercontent.com/u/13567791?v=4","gravatar_id":"","url":"https://api.github.com/users/dg0yt","html_url":"https://github.com/dg0yt","followers_url":"https://api.github.com/users/dg0yt/followers","following_url":"https://api.github.com/users/dg0yt/following{/other_user}","gists_url":"https://api.github.com/users/dg0yt/gists{/gist_id}","starred_url":"https://api.github.com/users/dg0yt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dg0yt/subscriptions","organizations_url":"https://api.github.com/users/dg0yt/orgs","repos_url":"https://api.github.com/users/dg0yt/repos","events_url":"https://api.github.com/users/dg0yt/events{/privacy}","received_events_url":"https://api.github.com/users/dg0yt/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/OpenOrienteering/mapper/milestones/31","html_url":"https://github.com/OpenOrienteering/mapper/milestone/31","labels_url":"https://api.github.com/repos/OpenOrienteering/mapper/milestones/31/labels","id":2710399,"node_id":"MDk6TWlsZXN0b25lMjcxMDM5OQ==","number":31,"title":"v0.9.0","description":"Qt 5.9. Drops support for OS X 10.7, some older Android versions, Windows XP, Windows Vista. Drops support for legacy binary format. New OCD export.","creator":{"login":"dg0yt","id":13567791,"node_id":"MDQ6VXNlcjEzNTY3Nzkx","avatar_url":"https://avatars3.githubusercontent.com/u/13567791?v=4","gravatar_id":"","url":"https://api.github.com/users/dg0yt","html_url":"https://github.com/dg0yt","followers_url":"https://api.github.com/users/dg0yt/followers","following_url":"https://api.github.com/users/dg0yt/following{/other_user}","gists_url":"https://api.github.com/users/dg0yt/gists{/gist_id}","starred_url":"https://api.github.com/users/dg0yt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dg0yt/subscriptions","organizations_url":"https://api.github.com/users/dg0yt/orgs","repos_url":"https://api.github.com/users/dg0yt/repos","events_url":"https://api.github.com/users/dg0yt/events{/privacy}","received_events_url":"https://api.github.com/users/dg0yt/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":8,"state":"open","created_at":"2017-08-18T21:02:58Z","updated_at":"2018-09-12T15:05:39Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/OpenOrienteering/mapper/pulls/1129/commits","review_comments_url":"https://api.github.com/repos/OpenOrienteering/mapper/pulls/1129/comments","review_comment_url":"https://api.github.com/repos/OpenOrienteering/mapper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenOrienteering/mapper/issues/1129/comments","statuses_url":"https://api.github.com/repos/OpenOrienteering/mapper/statuses/24eda802532872d81bab6ad2126697902bae78c3","head":{"label":"OpenOrienteering:custom-icons","ref":"custom-icons","sha":"24eda802532872d81bab6ad2126697902bae78c3","user":{"login":"OpenOrienteering","id":13568103,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNTY4MTAz","avatar_url":"https://avatars1.githubusercontent.com/u/13568103?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenOrienteering","html_url":"https://github.com/OpenOrienteering","followers_url":"https://api.github.com/users/OpenOrienteering/followers","following_url":"https://api.github.com/users/OpenOrienteering/following{/other_user}","gists_url":"https://api.github.com/users/OpenOrienteering/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenOrienteering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenOrienteering/subscriptions","organizations_url":"https://api.github.com/users/OpenOrienteering/orgs","repos_url":"https://api.github.com/users/OpenOrienteering/repos","events_url":"https://api.github.com/users/OpenOrienteering/events{/privacy}","received_events_url":"https://api.github.com/users/OpenOrienteering/received_events","type":"Organization","site_admin":false},"repo":{"id":39988826,"node_id":"MDEwOlJlcG9zaXRvcnkzOTk4ODgyNg==","name":"mapper","full_name":"OpenOrienteering/mapper","owner":{"login":"OpenOrienteering","id":13568103,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNTY4MTAz","avatar_url":"https://avatars1.githubusercontent.com/u/13568103?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenOrienteering","html_url":"https://github.com/OpenOrienteering","followers_url":"https://api.github.com/users/OpenOrienteering/followers","following_url":"https://api.github.com/users/OpenOrienteering/following{/other_user}","gists_url":"https://api.github.com/users/OpenOrienteering/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenOrienteering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenOrienteering/subscriptions","organizations_url":"https://api.github.com/users/OpenOrienteering/orgs","repos_url":"https://api.github.com/users/OpenOrienteering/repos","events_url":"https://api.github.com/users/OpenOrienteering/events{/privacy}","received_events_url":"https://api.github.com/users/OpenOrienteering/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenOrienteering/mapper","description":"OpenOrienteering Mapper is a software for creating maps for the orienteering sport.","fork":false,"url":"https://api.github.com/repos/OpenOrienteering/mapper","forks_url":"https://api.github.com/repos/OpenOrienteering/mapper/forks","keys_url":"https://api.github.com/repos/OpenOrienteering/mapper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenOrienteering/mapper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenOrienteering/mapper/teams","hooks_url":"https://api.github.com/repos/OpenOrienteering/mapper/hooks","issue_events_url":"https://api.github.com/repos/OpenOrienteering/mapper/issues/events{/number}","events_url":"https://api.github.com/repos/OpenOrienteering/mapper/events","assignees_url":"https://api.github.com/repos/OpenOrienteering/mapper/assignees{/user}","branches_url":"https://api.github.com/repos/OpenOrienteering/mapper/branches{/branch}","tags_url":"https://api.github.com/repos/OpenOrienteering/mapper/tags","blobs_url":"https://api.github.com/repos/OpenOrienteering/mapper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenOrienteering/mapper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenOrienteering/mapper/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenOrienteering/mapper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenOrienteering/mapper/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenOrienteering/mapper/languages","stargazers_url":"https://api.github.com/repos/OpenOrienteering/mapper/stargazers","contributors_url":"https://api.github.com/repos/OpenOrienteering/mapper/contributors","subscribers_url":"https://api.github.com/repos/OpenOrienteering/mapper/subscribers","subscription_url":"https://api.github.com/repos/OpenOrienteering/mapper/subscription","commits_url":"https://api.github.com/repos/OpenOrienteering/mapper/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenOrienteering/mapper/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenOrienteering/mapper/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenOrienteering/mapper/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenOrienteering/mapper/contents/{+path}","compare_url":"https://api.github.com/repos/OpenOrienteering/mapper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenOrienteering/mapper/merges","archive_url":"https://api.github.com/repos/OpenOrienteering/mapper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenOrienteering/mapper/downloads","issues_url":"https://api.github.com/repos/OpenOrienteering/mapper/issues{/number}","pulls_url":"https://api.github.com/repos/OpenOrienteering/mapper/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenOrienteering/mapper/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenOrienteering/mapper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenOrienteering/mapper/labels{/name}","releases_url":"https://api.github.com/repos/OpenOrienteering/mapper/releases{/id}","deployments_url":"https://api.github.com/repos/OpenOrienteering/mapper/deployments","created_at":"2015-07-31T05:46:22Z","updated_at":"2018-09-14T01:20:36Z","pushed_at":"2018-09-13T06:48:50Z","git_url":"git://github.com/OpenOrienteering/mapper.git","ssh_url":"git@github.com:OpenOrienteering/mapper.git","clone_url":"https://github.com/OpenOrienteering/mapper.git","svn_url":"https://github.com/OpenOrienteering/mapper","homepage":"https://www.openorienteering.org/apps/mapper/","size":48337,"stargazers_count":131,"watchers_count":131,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"archived":false,"open_issues_count":302,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":58,"open_issues":302,"watchers":131,"default_branch":"master"}},"base":{"label":"OpenOrienteering:dev","ref":"dev","sha":"2ac91b7034202ca5bfcaf28b99531f579f164a3b","user":{"login":"OpenOrienteering","id":13568103,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNTY4MTAz","avatar_url":"https://avatars1.githubusercontent.com/u/13568103?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenOrienteering","html_url":"https://github.com/OpenOrienteering","followers_url":"https://api.github.com/users/OpenOrienteering/followers","following_url":"https://api.github.com/users/OpenOrienteering/following{/other_user}","gists_url":"https://api.github.com/users/OpenOrienteering/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenOrienteering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenOrienteering/subscriptions","organizations_url":"https://api.github.com/users/OpenOrienteering/orgs","repos_url":"https://api.github.com/users/OpenOrienteering/repos","events_url":"https://api.github.com/users/OpenOrienteering/events{/privacy}","received_events_url":"https://api.github.com/users/OpenOrienteering/received_events","type":"Organization","site_admin":false},"repo":{"id":39988826,"node_id":"MDEwOlJlcG9zaXRvcnkzOTk4ODgyNg==","name":"mapper","full_name":"OpenOrienteering/mapper","owner":{"login":"OpenOrienteering","id":13568103,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNTY4MTAz","avatar_url":"https://avatars1.githubusercontent.com/u/13568103?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenOrienteering","html_url":"https://github.com/OpenOrienteering","followers_url":"https://api.github.com/users/OpenOrienteering/followers","following_url":"https://api.github.com/users/OpenOrienteering/following{/other_user}","gists_url":"https://api.github.com/users/OpenOrienteering/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenOrienteering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenOrienteering/subscriptions","organizations_url":"https://api.github.com/users/OpenOrienteering/orgs","repos_url":"https://api.github.com/users/OpenOrienteering/repos","events_url":"https://api.github.com/users/OpenOrienteering/events{/privacy}","received_events_url":"https://api.github.com/users/OpenOrienteering/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenOrienteering/mapper","description":"OpenOrienteering Mapper is a software for creating maps for the orienteering sport.","fork":false,"url":"https://api.github.com/repos/OpenOrienteering/mapper","forks_url":"https://api.github.com/repos/OpenOrienteering/mapper/forks","keys_url":"https://api.github.com/repos/OpenOrienteering/mapper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenOrienteering/mapper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenOrienteering/mapper/teams","hooks_url":"https://api.github.com/repos/OpenOrienteering/mapper/hooks","issue_events_url":"https://api.github.com/repos/OpenOrienteering/mapper/issues/events{/number}","events_url":"https://api.github.com/repos/OpenOrienteering/mapper/events","assignees_url":"https://api.github.com/repos/OpenOrienteering/mapper/assignees{/user}","branches_url":"https://api.github.com/repos/OpenOrienteering/mapper/branches{/branch}","tags_url":"https://api.github.com/repos/OpenOrienteering/mapper/tags","blobs_url":"https://api.github.com/repos/OpenOrienteering/mapper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenOrienteering/mapper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenOrienteering/mapper/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenOrienteering/mapper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenOrienteering/mapper/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenOrienteering/mapper/languages","stargazers_url":"https://api.github.com/repos/OpenOrienteering/mapper/stargazers","contributors_url":"https://api.github.com/repos/OpenOrienteering/mapper/contributors","subscribers_url":"https://api.github.com/repos/OpenOrienteering/mapper/subscribers","subscription_url":"https://api.github.com/repos/OpenOrienteering/mapper/subscription","commits_url":"https://api.github.com/repos/OpenOrienteering/mapper/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenOrienteering/mapper/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenOrienteering/mapper/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenOrienteering/mapper/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenOrienteering/mapper/contents/{+path}","compare_url":"https://api.github.com/repos/OpenOrienteering/mapper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenOrienteering/mapper/merges","archive_url":"https://api.github.com/repos/OpenOrienteering/mapper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenOrienteering/mapper/downloads","issues_url":"https://api.github.com/repos/OpenOrienteering/mapper/issues{/number}","pulls_url":"https://api.github.com/repos/OpenOrienteering/mapper/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenOrienteering/mapper/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenOrienteering/mapper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenOrienteering/mapper/labels{/name}","releases_url":"https://api.github.com/repos/OpenOrienteering/mapper/releases{/id}","deployments_url":"https://api.github.com/repos/OpenOrienteering/mapper/deployments","created_at":"2015-07-31T05:46:22Z","updated_at":"2018-09-14T01:20:36Z","pushed_at":"2018-09-13T06:48:50Z","git_url":"git://github.com/OpenOrienteering/mapper.git","ssh_url":"git@github.com:OpenOrienteering/mapper.git","clone_url":"https://github.com/OpenOrienteering/mapper.git","svn_url":"https://github.com/OpenOrienteering/mapper","homepage":"https://www.openorienteering.org/apps/mapper/","size":48337,"stargazers_count":131,"watchers_count":131,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"archived":false,"open_issues_count":302,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":58,"open_issues":302,"watchers":131,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenOrienteering/mapper/pulls/1129"},"html":{"href":"https://github.com/OpenOrienteering/mapper/pull/1129"},"issue":{"href":"https://api.github.com/repos/OpenOrienteering/mapper/issues/1129"},"comments":{"href":"https://api.github.com/repos/OpenOrienteering/mapper/issues/1129/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenOrienteering/mapper/pulls/1129/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenOrienteering/mapper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenOrienteering/mapper/pulls/1129/commits"},"statuses":{"href":"https://api.github.com/repos/OpenOrienteering/mapper/statuses/24eda802532872d81bab6ad2126697902bae78c3"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"dg0yt"}}