ropensci / parzer

Parse geographic coordinates
https://docs.ropensci.org/parzer
Other
63 stars 6 forks source link

Change Rcpp::List to std::vector<float> #42

Closed mpadge closed 1 year ago

mpadge commented 1 year ago

In split_decimal_degree

github-actions[bot] commented 1 year ago

Thanks! \nWe will look into it ASAP.

AlbanSagouis commented 1 year ago

In the middle of split_decimal_degree there is a call to Rcpp::toString(x) that takes float& xand turns it into const std::string& x_str. How would you do that without calling Rcpp?

The conversion is done to unable a call to is_negative() that takes only strings. That seems overkill and a purely numeric cpp solution seems a better solution.