Skip to content

Commit

Permalink
Removed duplicate items in derived classes
Browse files Browse the repository at this point in the history
  • Loading branch information
pranjal-rai committed Aug 20, 2017
1 parent 68e7cf3 commit cfc7785
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 143 deletions.
4 changes: 2 additions & 2 deletions examples/dynamic_pointcloud_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ void kdtree_demo(const size_t N)
index.addPoints(i, end);
}

// remove a random point
size_t removePointIndex = rand()%N;
// remove a point
size_t removePointIndex = N-1;
index.removePoint(removePointIndex);

dump_mem_usage();
Expand Down
Loading

1 comment on commit cfc7785

@jlblancoc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

But I think there are plenty of other functions that can be also moved to the base class, right?
For example:

  • dataset_get()
  • save_tree()
  • load_tree()
  • init_vind()
  • Initialization code like BaseClassRef::root_node = NULL; that refers to data members in the base class, should be better moved to the ctor of the base class...
  • ...

Please sign in to comment.