{"action":"created","issue":{"url":"https://api.github.com/repos/otland/forgottenserver/issues/1521","labels_url":"https://api.github.com/repos/otland/forgottenserver/issues/1521/labels{/name}","comments_url":"https://api.github.com/repos/otland/forgottenserver/issues/1521/comments","events_url":"https://api.github.com/repos/otland/forgottenserver/issues/1521/events","html_url":"https://github.com/otland/forgottenserver/pull/1521","id":101168969,"number":1521,"title":"Replace reinterpret_casts.","user":{"login":"djarek","id":6125067,"avatar_url":"https://avatars.githubusercontent.com/u/6125067?v=3","gravatar_id":"","url":"https://api.github.com/users/djarek","html_url":"https://github.com/djarek","followers_url":"https://api.github.com/users/djarek/followers","following_url":"https://api.github.com/users/djarek/following{/other_user}","gists_url":"https://api.github.com/users/djarek/gists{/gist_id}","starred_url":"https://api.github.com/users/djarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djarek/subscriptions","organizations_url":"https://api.github.com/users/djarek/orgs","repos_url":"https://api.github.com/users/djarek/repos","events_url":"https://api.github.com/users/djarek/events{/privacy}","received_events_url":"https://api.github.com/users/djarek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-15T11:53:59Z","updated_at":"2015-08-15T13:24:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/otland/forgottenserver/pulls/1521","html_url":"https://github.com/otland/forgottenserver/pull/1521","diff_url":"https://github.com/otland/forgottenserver/pull/1521.diff","patch_url":"https://github.com/otland/forgottenserver/pull/1521.patch"},"body":"Replaced reinterpret_casts where the semantic meaning of the type\r\ncast is satisfied by a static_cast (in other word where we cast\r\npointers/references to objects that are related)."},"comment":{"url":"https://api.github.com/repos/otland/forgottenserver/issues/comments/131374332","html_url":"https://github.com/otland/forgottenserver/pull/1521#issuecomment-131374332","issue_url":"https://api.github.com/repos/otland/forgottenserver/issues/1521","id":131374332,"user":{"login":"djarek","id":6125067,"avatar_url":"https://avatars.githubusercontent.com/u/6125067?v=3","gravatar_id":"","url":"https://api.github.com/users/djarek","html_url":"https://github.com/djarek","followers_url":"https://api.github.com/users/djarek/followers","following_url":"https://api.github.com/users/djarek/following{/other_user}","gists_url":"https://api.github.com/users/djarek/gists{/gist_id}","starred_url":"https://api.github.com/users/djarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djarek/subscriptions","organizations_url":"https://api.github.com/users/djarek/orgs","repos_url":"https://api.github.com/users/djarek/repos","events_url":"https://api.github.com/users/djarek/events{/privacy}","received_events_url":"https://api.github.com/users/djarek/received_events","type":"User","site_admin":false},"created_at":"2015-08-15T13:24:44Z","updated_at":"2015-08-15T13:24:44Z","body":"AFAIK the only C++-style cast that imposes an overhead is dynamic_cast (because it does checks using RTTI).\r\n```\r\ndynamic_cast\r\n is primarily used to perf\r\norm “safe downcasting,” i.e.,\r\nto determine whether an object is \r\nof a particular type in an inher-\r\nitance hierarchy. It is the only cast that cannot be performed us-\r\ning the old-style syntax. It is also the only cast that may have a\r\nsignificant runtime cost\r\n. (I’ll provide details on this a bit later.)\r\n```\r\nsource: http://www.aristeia.com/EC3E/3E_item27.pdf\r\n(it quotes Meyer's book, so I guess it's a reliable source)"}}