Skip to content

Commit cfc0a45

Browse files
committed
Removed redundant assignment (issue flann-lib#422)
1 parent 119a248 commit cfc0a45

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Current
2+
* Removed redundant assignment (issue #422 @fluber)
23
* Removed unnecessary null checks before delete (issue #420 @elfring)
34
* Reverted PR #424 due to lack of portability
45
* fscanf fix (PR #467 @rdelfin)

src/cpp/flann/util/any.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ struct big_any_policy : typed_base_any_policy<T>
7878
{
7979
virtual void static_delete(void** x)
8080
{
81-
if (* x) delete (* reinterpret_cast<T**>(x));
82-
*x = NULL;
81+
if (* x) {
82+
delete (* reinterpret_cast<T**>(x));
83+
*x = NULL;
84+
}
8385
}
8486
virtual void copy_from_value(void const* src, void** dest)
8587
{

0 commit comments

Comments
 (0)