Skip to content

Commit 49efac0

Browse files
committed
Fix TreeMap/TreeSet: move aliases after HashMap definition
1 parent c986ad9 commit 49efac0

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Processing.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3635,9 +3635,6 @@ class PShader {
36353635

36363636

36373637

3638-
// Java TreeMap and TreeSet -- aliases (std::map is already sorted)
3639-
template<class K, class V> using TreeMap = HashMap<K,V>;
3640-
template<class T> using TreeSet = HashSet<T>;
36413638

36423639
// Java Random class
36433640
class Random {
@@ -3734,6 +3731,8 @@ class HashMap {
37343731
void putIfAbsent(const K& k, const V& v){ if(!data.count(k)) data[k]=v; }
37353732
::std::vector<::std::pair<K,V>> entrySet() const { ::std::vector<::std::pair<K,V>> r; for(auto& p:data) r.push_back(p); return r; }
37363733
};
3734+
template<class K, class V> using TreeMap = HashMap<K,V>;
3735+
template<class T> using TreeSet = HashSet<T>;
37373736

37383737

37393738
// =============================================================================

0 commit comments

Comments
 (0)