Skip to content

Commit

Permalink
add ifdef for emscripten
Browse files Browse the repository at this point in the history
Thanks to George Stagg (@georgestagg) for sharing a patch that can
help ggrepel to be compatible with WebR.

See here for more details:
#256
  • Loading branch information
slowkow committed Feb 11, 2024
1 parent 1144585 commit e23ff7a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/repel_boxes.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#include <Rcpp.h>
#ifdef __EMSCRIPTEN__
#define __linux
#include <Rcpp/Benchmark/Timer.h>
#undef __linux
#else
#include <Rcpp/Benchmark/Timer.h>
#endif
#include <deque>
using namespace Rcpp;

Expand Down

0 comments on commit e23ff7a

Please sign in to comment.