{"action":"created","comment":{"url":"https://api.github.com/repos/googlecartographer/cartographer/pulls/comments/183650588","pull_request_review_id":114686049,"id":183650588,"diff_hunk":"@@ -0,0 +1,52 @@\n+/*\n+ * Copyright 2018 The Cartographer Authors\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+#ifndef CARTOGRAPHER_IO_FAKE_FILE_WRITER_H_\n+#define CARTOGRAPHER_IO_FAKE_FILE_WRITER_H_\n+\n+#include <memory>\n+#include <string>\n+\n+#include \"cartographer/io/file_writer.h\"\n+\n+namespace cartographer {\n+namespace io {\n+\n+// Fakes a FileWriter by just writing the data to a std::string.\n+class FakeFileWriter : public FileWriter {\n+ public:\n+  FakeFileWriter(const std::string& filename,\n+                 std::shared_ptr<std::string> on_close_output =","path":"cartographer/io/fake_file_writer.h","position":32,"original_position":32,"commit_id":"607eceb1659fbe910b5ad219f9e6a04c2cb51509","original_commit_id":"607eceb1659fbe910b5ad219f9e6a04c2cb51509","user":{"login":"pifon2a","id":32522095,"avatar_url":"https://avatars2.githubusercontent.com/u/32522095?v=4","gravatar_id":"","url":"https://api.github.com/users/pifon2a","html_url":"https://github.com/pifon2a","followers_url":"https://api.github.com/users/pifon2a/followers","following_url":"https://api.github.com/users/pifon2a/following{/other_user}","gists_url":"https://api.github.com/users/pifon2a/gists{/gist_id}","starred_url":"https://api.github.com/users/pifon2a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pifon2a/subscriptions","organizations_url":"https://api.github.com/users/pifon2a/orgs","repos_url":"https://api.github.com/users/pifon2a/repos","events_url":"https://api.github.com/users/pifon2a/events{/privacy}","received_events_url":"https://api.github.com/users/pifon2a/received_events","type":"User","site_admin":false},"body":"do you really need shared_ptr? Can you use unique_ptr?","created_at":"2018-04-24T08:46:07Z","updated_at":"2018-04-24T08:48:47Z","html_url":"https://github.com/googlecartographer/cartographer/pull/1101#discussion_r183650588","pull_request_url":"https://api.github.com/repos/googlecartographer/cartographer/pulls/1101","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/googlecartographer/cartographer/pulls/comments/183650588"},"html":{"href":"https://github.com/googlecartographer/cartographer/pull/1101#discussion_r183650588"},"pull_request":{"href":"https://api.github.com/repos/googlecartographer/cartographer/pulls/1101"}}},"pull_request":{"url":"https://api.github.com/repos/googlecartographer/cartographer/pulls/1101","id":183058842,"html_url":"https://github.com/googlecartographer/cartographer/pull/1101","diff_url":"https://github.com/googlecartographer/cartographer/pull/1101.diff","patch_url":"https://github.com/googlecartographer/cartographer/pull/1101.patch","issue_url":"https://api.github.com/repos/googlecartographer/cartographer/issues/1101","number":1101,"state":"open","locked":false,"title":"Added a fake file writer (writes to string instead of file)","user":{"login":"schwoere","id":6522266,"avatar_url":"https://avatars3.githubusercontent.com/u/6522266?v=4","gravatar_id":"","url":"https://api.github.com/users/schwoere","html_url":"https://github.com/schwoere","followers_url":"https://api.github.com/users/schwoere/followers","following_url":"https://api.github.com/users/schwoere/following{/other_user}","gists_url":"https://api.github.com/users/schwoere/gists{/gist_id}","starred_url":"https://api.github.com/users/schwoere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schwoere/subscriptions","organizations_url":"https://api.github.com/users/schwoere/orgs","repos_url":"https://api.github.com/users/schwoere/repos","events_url":"https://api.github.com/users/schwoere/events{/privacy}","received_events_url":"https://api.github.com/users/schwoere/received_events","type":"User","site_admin":false},"body":"Added fake filer writer which writes the output to a string instead of a file.\r\n\r\nThis will help writing tests for classes that use the file writer interface to write data.","created_at":"2018-04-20T13:14:48Z","updated_at":"2018-04-24T08:48:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"07bd8fb7fe6d84e7947308ac929d1ea90a423efb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":418020229,"url":"https://api.github.com/repos/googlecartographer/cartographer/labels/cla:%20yes","name":"cla: yes","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/googlecartographer/cartographer/pulls/1101/commits","review_comments_url":"https://api.github.com/repos/googlecartographer/cartographer/pulls/1101/comments","review_comment_url":"https://api.github.com/repos/googlecartographer/cartographer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/googlecartographer/cartographer/issues/1101/comments","statuses_url":"https://api.github.com/repos/googlecartographer/cartographer/statuses/607eceb1659fbe910b5ad219f9e6a04c2cb51509","head":{"label":"schwoere:fake_file_writer","ref":"fake_file_writer","sha":"607eceb1659fbe910b5ad219f9e6a04c2cb51509","user":{"login":"schwoere","id":6522266,"avatar_url":"https://avatars3.githubusercontent.com/u/6522266?v=4","gravatar_id":"","url":"https://api.github.com/users/schwoere","html_url":"https://github.com/schwoere","followers_url":"https://api.github.com/users/schwoere/followers","following_url":"https://api.github.com/users/schwoere/following{/other_user}","gists_url":"https://api.github.com/users/schwoere/gists{/gist_id}","starred_url":"https://api.github.com/users/schwoere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schwoere/subscriptions","organizations_url":"https://api.github.com/users/schwoere/orgs","repos_url":"https://api.github.com/users/schwoere/repos","events_url":"https://api.github.com/users/schwoere/events{/privacy}","received_events_url":"https://api.github.com/users/schwoere/received_events","type":"User","site_admin":false},"repo":{"id":128075870,"name":"cartographer","full_name":"schwoere/cartographer","owner":{"login":"schwoere","id":6522266,"avatar_url":"https://avatars3.githubusercontent.com/u/6522266?v=4","gravatar_id":"","url":"https://api.github.com/users/schwoere","html_url":"https://github.com/schwoere","followers_url":"https://api.github.com/users/schwoere/followers","following_url":"https://api.github.com/users/schwoere/following{/other_user}","gists_url":"https://api.github.com/users/schwoere/gists{/gist_id}","starred_url":"https://api.github.com/users/schwoere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schwoere/subscriptions","organizations_url":"https://api.github.com/users/schwoere/orgs","repos_url":"https://api.github.com/users/schwoere/repos","events_url":"https://api.github.com/users/schwoere/events{/privacy}","received_events_url":"https://api.github.com/users/schwoere/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/schwoere/cartographer","description":"Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.","fork":true,"url":"https://api.github.com/repos/schwoere/cartographer","forks_url":"https://api.github.com/repos/schwoere/cartographer/forks","keys_url":"https://api.github.com/repos/schwoere/cartographer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schwoere/cartographer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schwoere/cartographer/teams","hooks_url":"https://api.github.com/repos/schwoere/cartographer/hooks","issue_events_url":"https://api.github.com/repos/schwoere/cartographer/issues/events{/number}","events_url":"https://api.github.com/repos/schwoere/cartographer/events","assignees_url":"https://api.github.com/repos/schwoere/cartographer/assignees{/user}","branches_url":"https://api.github.com/repos/schwoere/cartographer/branches{/branch}","tags_url":"https://api.github.com/repos/schwoere/cartographer/tags","blobs_url":"https://api.github.com/repos/schwoere/cartographer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schwoere/cartographer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schwoere/cartographer/git/refs{/sha}","trees_url":"https://api.github.com/repos/schwoere/cartographer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schwoere/cartographer/statuses/{sha}","languages_url":"https://api.github.com/repos/schwoere/cartographer/languages","stargazers_url":"https://api.github.com/repos/schwoere/cartographer/stargazers","contributors_url":"https://api.github.com/repos/schwoere/cartographer/contributors","subscribers_url":"https://api.github.com/repos/schwoere/cartographer/subscribers","subscription_url":"https://api.github.com/repos/schwoere/cartographer/subscription","commits_url":"https://api.github.com/repos/schwoere/cartographer/commits{/sha}","git_commits_url":"https://api.github.com/repos/schwoere/cartographer/git/commits{/sha}","comments_url":"https://api.github.com/repos/schwoere/cartographer/comments{/number}","issue_comment_url":"https://api.github.com/repos/schwoere/cartographer/issues/comments{/number}","contents_url":"https://api.github.com/repos/schwoere/cartographer/contents/{+path}","compare_url":"https://api.github.com/repos/schwoere/cartographer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schwoere/cartographer/merges","archive_url":"https://api.github.com/repos/schwoere/cartographer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schwoere/cartographer/downloads","issues_url":"https://api.github.com/repos/schwoere/cartographer/issues{/number}","pulls_url":"https://api.github.com/repos/schwoere/cartographer/pulls{/number}","milestones_url":"https://api.github.com/repos/schwoere/cartographer/milestones{/number}","notifications_url":"https://api.github.com/repos/schwoere/cartographer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schwoere/cartographer/labels{/name}","releases_url":"https://api.github.com/repos/schwoere/cartographer/releases{/id}","deployments_url":"https://api.github.com/repos/schwoere/cartographer/deployments","created_at":"2018-04-04T14:40:21Z","updated_at":"2018-04-16T11:24:52Z","pushed_at":"2018-04-24T08:37:10Z","git_url":"git://github.com/schwoere/cartographer.git","ssh_url":"git@github.com:schwoere/cartographer.git","clone_url":"https://github.com/schwoere/cartographer.git","svn_url":"https://github.com/schwoere/cartographer","homepage":"","size":4339,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"googlecartographer:master","ref":"master","sha":"643bc825e9a1ddd8e83a90330d5ca9b69bcf39a5","user":{"login":"googlecartographer","id":20636162,"avatar_url":"https://avatars3.githubusercontent.com/u/20636162?v=4","gravatar_id":"","url":"https://api.github.com/users/googlecartographer","html_url":"https://github.com/googlecartographer","followers_url":"https://api.github.com/users/googlecartographer/followers","following_url":"https://api.github.com/users/googlecartographer/following{/other_user}","gists_url":"https://api.github.com/users/googlecartographer/gists{/gist_id}","starred_url":"https://api.github.com/users/googlecartographer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googlecartographer/subscriptions","organizations_url":"https://api.github.com/users/googlecartographer/orgs","repos_url":"https://api.github.com/users/googlecartographer/repos","events_url":"https://api.github.com/users/googlecartographer/events{/privacy}","received_events_url":"https://api.github.com/users/googlecartographer/received_events","type":"Organization","site_admin":false},"repo":{"id":64732358,"name":"cartographer","full_name":"googlecartographer/cartographer","owner":{"login":"googlecartographer","id":20636162,"avatar_url":"https://avatars3.githubusercontent.com/u/20636162?v=4","gravatar_id":"","url":"https://api.github.com/users/googlecartographer","html_url":"https://github.com/googlecartographer","followers_url":"https://api.github.com/users/googlecartographer/followers","following_url":"https://api.github.com/users/googlecartographer/following{/other_user}","gists_url":"https://api.github.com/users/googlecartographer/gists{/gist_id}","starred_url":"https://api.github.com/users/googlecartographer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googlecartographer/subscriptions","organizations_url":"https://api.github.com/users/googlecartographer/orgs","repos_url":"https://api.github.com/users/googlecartographer/repos","events_url":"https://api.github.com/users/googlecartographer/events{/privacy}","received_events_url":"https://api.github.com/users/googlecartographer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/googlecartographer/cartographer","description":"Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.","fork":false,"url":"https://api.github.com/repos/googlecartographer/cartographer","forks_url":"https://api.github.com/repos/googlecartographer/cartographer/forks","keys_url":"https://api.github.com/repos/googlecartographer/cartographer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/googlecartographer/cartographer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/googlecartographer/cartographer/teams","hooks_url":"https://api.github.com/repos/googlecartographer/cartographer/hooks","issue_events_url":"https://api.github.com/repos/googlecartographer/cartographer/issues/events{/number}","events_url":"https://api.github.com/repos/googlecartographer/cartographer/events","assignees_url":"https://api.github.com/repos/googlecartographer/cartographer/assignees{/user}","branches_url":"https://api.github.com/repos/googlecartographer/cartographer/branches{/branch}","tags_url":"https://api.github.com/repos/googlecartographer/cartographer/tags","blobs_url":"https://api.github.com/repos/googlecartographer/cartographer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/googlecartographer/cartographer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/googlecartographer/cartographer/git/refs{/sha}","trees_url":"https://api.github.com/repos/googlecartographer/cartographer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/googlecartographer/cartographer/statuses/{sha}","languages_url":"https://api.github.com/repos/googlecartographer/cartographer/languages","stargazers_url":"https://api.github.com/repos/googlecartographer/cartographer/stargazers","contributors_url":"https://api.github.com/repos/googlecartographer/cartographer/contributors","subscribers_url":"https://api.github.com/repos/googlecartographer/cartographer/subscribers","subscription_url":"https://api.github.com/repos/googlecartographer/cartographer/subscription","commits_url":"https://api.github.com/repos/googlecartographer/cartographer/commits{/sha}","git_commits_url":"https://api.github.com/repos/googlecartographer/cartographer/git/commits{/sha}","comments_url":"https://api.github.com/repos/googlecartographer/cartographer/comments{/number}","issue_comment_url":"https://api.github.com/repos/googlecartographer/cartographer/issues/comments{/number}","contents_url":"https://api.github.com/repos/googlecartographer/cartographer/contents/{+path}","compare_url":"https://api.github.com/repos/googlecartographer/cartographer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/googlecartographer/cartographer/merges","archive_url":"https://api.github.com/repos/googlecartographer/cartographer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/googlecartographer/cartographer/downloads","issues_url":"https://api.github.com/repos/googlecartographer/cartographer/issues{/number}","pulls_url":"https://api.github.com/repos/googlecartographer/cartographer/pulls{/number}","milestones_url":"https://api.github.com/repos/googlecartographer/cartographer/milestones{/number}","notifications_url":"https://api.github.com/repos/googlecartographer/cartographer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/googlecartographer/cartographer/labels{/name}","releases_url":"https://api.github.com/repos/googlecartographer/cartographer/releases{/id}","deployments_url":"https://api.github.com/repos/googlecartographer/cartographer/deployments","created_at":"2016-08-02T06:55:43Z","updated_at":"2018-04-24T07:17:42Z","pushed_at":"2018-04-24T08:37:12Z","git_url":"git://github.com/googlecartographer/cartographer.git","ssh_url":"git@github.com:googlecartographer/cartographer.git","clone_url":"https://github.com/googlecartographer/cartographer.git","svn_url":"https://github.com/googlecartographer/cartographer","homepage":"","size":4336,"stargazers_count":3338,"watchers_count":3338,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1061,"mirror_url":null,"archived":false,"open_issues_count":32,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1061,"open_issues":32,"watchers":3338,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/googlecartographer/cartographer/pulls/1101"},"html":{"href":"https://github.com/googlecartographer/cartographer/pull/1101"},"issue":{"href":"https://api.github.com/repos/googlecartographer/cartographer/issues/1101"},"comments":{"href":"https://api.github.com/repos/googlecartographer/cartographer/issues/1101/comments"},"review_comments":{"href":"https://api.github.com/repos/googlecartographer/cartographer/pulls/1101/comments"},"review_comment":{"href":"https://api.github.com/repos/googlecartographer/cartographer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/googlecartographer/cartographer/pulls/1101/commits"},"statuses":{"href":"https://api.github.com/repos/googlecartographer/cartographer/statuses/607eceb1659fbe910b5ad219f9e6a04c2cb51509"}},"author_association":"NONE"}}
{"actor":{"display_login":"pifon2a"}}