{"comment":{"url":"https://api.github.com/repos/nmap/nmap/comments/18694965","html_url":"https://github.com/nmap/nmap/commit/7c0280382e8682c151e73cd2afa560d304603462#commitcomment-18694965","id":18694965,"user":{"login":"dmiller-nmap","id":10443029,"avatar_url":"https://avatars.githubusercontent.com/u/10443029?v=3","gravatar_id":"","url":"https://api.github.com/users/dmiller-nmap","html_url":"https://github.com/dmiller-nmap","followers_url":"https://api.github.com/users/dmiller-nmap/followers","following_url":"https://api.github.com/users/dmiller-nmap/following{/other_user}","gists_url":"https://api.github.com/users/dmiller-nmap/gists{/gist_id}","starred_url":"https://api.github.com/users/dmiller-nmap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmiller-nmap/subscriptions","organizations_url":"https://api.github.com/users/dmiller-nmap/orgs","repos_url":"https://api.github.com/users/dmiller-nmap/repos","events_url":"https://api.github.com/users/dmiller-nmap/events{/privacy}","received_events_url":"https://api.github.com/users/dmiller-nmap/received_events","type":"User","site_admin":false},"position":17,"line":658,"path":"scan_engine.h","commit_id":"7c0280382e8682c151e73cd2afa560d304603462","created_at":"2016-08-18T19:50:31Z","updated_at":"2016-08-18T19:50:31Z","body":"@gvanem Can you try this patch? I just threw `const` anywhere it would fit, since it's a comparison operator, basically:\r\n\r\n```diff\r\ndiff --git a/scan_engine.cc b/scan_engine.cc\r\nindex 638da1c..bca714b 100644\r\n--- a/scan_engine.cc\r\n+++ b/scan_engine.cc\r\n@@ -153,7 +153,7 @@ extern \"C\" int g_has_npcap_loopback;\r\n #endif\r\n \r\n \r\n-int HssPredicate::operator() (HostScanStats *lhs, HostScanStats *rhs) {\r\n+const int HssPredicate::operator() (const HostScanStats *lhs, const HostScanStats *rhs) const {\r\n   const struct sockaddr_storage *lss, *rss;\r\n   lss = (lhs) ? lhs->target->TargetSockAddr() : ss;\r\n   rss = (rhs) ? rhs->target->TargetSockAddr() : ss;\r\ndiff --git a/scan_engine.h b/scan_engine.h\r\nindex a7fbd91..9424611 100644\r\n--- a/scan_engine.h\r\n+++ b/scan_engine.h\r\n@@ -653,7 +653,7 @@ struct ultra_scan_performance_vars : public scan_performance_vars {\r\n \r\n struct HssPredicate {\r\n public:\r\n-  int operator() (HostScanStats *lhs, HostScanStats *rhs);\r\n+  const int operator() (const HostScanStats *lhs, const HostScanStats *rhs) const;\r\n   static struct sockaddr_storage *ss;\r\n };\r\n \r\n```"}}
{"actor":{"display_login":"dmiller-nmap"}}