Skip to content

Commit cc84248

Browse files
committed
Some renaming / restructuring
1 parent ebd40f0 commit cc84248

File tree

5 files changed

+6
-119
lines changed

5 files changed

+6
-119
lines changed

inst/include/Rcpp/hash/IndexHash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ namespace Rcpp{
160160
}
161161

162162
inline bool not_equal(const STORAGE& lhs, const STORAGE& rhs) {
163-
return ! ::Rcpp::traits::equal_type<STORAGE>()(lhs, rhs);
163+
return ! ::Rcpp::traits::NAEquals<STORAGE>()(lhs, rhs);
164164
}
165165

166166
bool add_value(int i){

inst/include/Rcpp/sugar/functions/table.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class Table {
7878
}
7979

8080
private:
81-
typedef RCPP_UNORDERED_MAP<STORAGE, int, ::Rcpp::traits::comparator_type<STORAGE> >HASH ;
81+
typedef RCPP_UNORDERED_MAP<STORAGE, int, ::Rcpp::traits::NAComparator<STORAGE> >HASH ;
8282
typedef CountInserter<HASH,STORAGE> Inserter ;
8383
HASH hash ;
8484
};
@@ -113,7 +113,7 @@ class Table {
113113
typedef CountInserter<HASH,STORAGE> Inserter ;
114114
HASH hash ;
115115

116-
typedef std::map<STORAGE, int, ::Rcpp::traits::comparator_type<STORAGE> > SORTED_MAP ;
116+
typedef std::map<STORAGE, int, ::Rcpp::traits::NAComparator<STORAGE> > SORTED_MAP ;
117117
SORTED_MAP map ;
118118

119119
};

inst/include/Rcpp/traits/comparator_type.h

Lines changed: 0 additions & 114 deletions
This file was deleted.

inst/include/Rcpp/traits/traits.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
#include <Rcpp/traits/storage_type.h>
3939
#include <Rcpp/traits/r_sexptype_traits.h>
4040
#include <Rcpp/traits/storage_type.h>
41-
#include <Rcpp/traits/comparator_type.h>
41+
#include <Rcpp/traits/NAComparator.h>
42+
#include <Rcpp/traits/NAEquals.h>
4243
#include <Rcpp/traits/r_type_traits.h>
4344
#include <Rcpp/traits/un_pointer.h>
4445
#include <Rcpp/traits/is_pointer.h>

inst/include/Rcpp/vector/Vector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ class Vector :
247247
std::sort(
248248
start,
249249
start + size(),
250-
typename traits::comparator_type<typename traits::storage_type<RTYPE>::type >()
250+
typename traits::NAComparator<typename traits::storage_type<RTYPE>::type >()
251251
) ;
252252
return *this ;
253253
}

0 commit comments

Comments
 (0)