提交 c2d2e473 编写于 作者: M Marius Muja

Merge pull request #246 from dm-jrae/master

result_set bugfix
......@@ -3,6 +3,7 @@ The BSD License
Copyright (c) 2008-2011 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
Copyright (c) 2008-2011 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
Copyright (c) 2015 Google Inc (Jack Rae, jwrae@google.com). All Rights Reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
......
......@@ -252,12 +252,10 @@ public:
#endif
{
// Check for duplicate indices
size_t j = i - 1;
while (dist_index_[j].dist_ == dist) {
for (size_t j = i - 1; dist_index_[j].dist_ == dist && j--;) {
if (dist_index_[j].index_ == index) {
return;
}
--j;
}
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册