Skip to content

Conversation

@AIG-Livny
Copy link

Hi! This is a very cool library! Thank you very much! I would like to use it in my pet project and have made some minor improvements:

  • I found it useful to move macros outside. It can be set globally or before rtree.h including. Also there is default values in rtree.h.
  • Macro renamed - added prefix "RTREE_" for global setup
  • All tests extended to other dimensions and number types of spatial coords
  • don’t know if this is the right thing, but I removed priv_funcs.h because to access private functions in tests, can be included the entire rtree.c
  • changed macro bench to move code into functions and being able to look at it with a debugger
  • It may appear that the is_float_point macro is running runtime, but compiler will optimize it
  • I wanted to keep the original code in the tests for dimension 2 and type double because longitude and latitude are used there, obviously this is a more common case of application. So now there is a macro #if RTREE_DIMS == 2
  • macro DISABLE_WARNING got from https://www.fluentcpp.com/2019/08/30/how-to-disable-a-warning-in-cpp/

recreated PR, because mistake the branch

@logankaser
Copy link

logankaser commented Jun 19, 2025

It would be great to merge this, even just for the:

#ifdef __cplusplus
extern "C" {
#endif

Change, I patch this library to add that right now.
The un-namespaced macros are a bit collision prone as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants