mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-16 20:57:00 +00:00
clang-format pass
This commit is contained in:
@@ -34,4 +34,4 @@ private:
|
||||
};
|
||||
} // namespace rstl
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -10,13 +10,15 @@
|
||||
#include "rstl/vector.hpp"
|
||||
|
||||
namespace rstl {
|
||||
template < typename K, typename P, int unk, typename Select, typename Hash, typename Equal, typename Alloc = rmemory_allocator >
|
||||
template < typename K, typename P, int unk, typename Select, typename Hash, typename Equal,
|
||||
typename Alloc = rmemory_allocator >
|
||||
class hash_table {
|
||||
private:
|
||||
rstl::vector< rstl::list< P, Alloc > /*::iterator*/, Alloc > x;
|
||||
};
|
||||
|
||||
template < typename K, typename V, typename Hash, typename Equal, typename Alloc = rmemory_allocator >
|
||||
template < typename K, typename V, typename Hash, typename Equal,
|
||||
typename Alloc = rmemory_allocator >
|
||||
class hash_map {
|
||||
typedef rstl::pair< K, V > Pair;
|
||||
|
||||
|
||||
@@ -10,7 +10,10 @@ public:
|
||||
inline pair() {}
|
||||
inline pair(const L& first, const R& second) : first(first), second(second) {}
|
||||
inline pair(const pair& other) : first(other.first), second(other.second) {}
|
||||
inline void operator=(const pair& other) { first = other.first; second = other.second; }
|
||||
inline void operator=(const pair& other) {
|
||||
first = other.first;
|
||||
second = other.second;
|
||||
}
|
||||
|
||||
L first;
|
||||
R second;
|
||||
|
||||
@@ -22,8 +22,14 @@ public:
|
||||
|
||||
const_pointer_iterator() : current(nullptr) {}
|
||||
const_pointer_iterator(const T* begin) : current(begin) {}
|
||||
const_pointer_iterator& operator++() { ++current; return *this; }
|
||||
const_pointer_iterator& operator--() { --current; return *this; }
|
||||
const_pointer_iterator& operator++() {
|
||||
++current;
|
||||
return *this;
|
||||
}
|
||||
const_pointer_iterator& operator--() {
|
||||
--current;
|
||||
return *this;
|
||||
}
|
||||
T* get_pointer() const { return const_cast< T* >(current); }
|
||||
const T& operator*() const { return *get_pointer(); }
|
||||
const T* operator->() const { return get_pointer(); }
|
||||
@@ -31,8 +37,12 @@ public:
|
||||
bool operator==(const const_pointer_iterator& other) { return current == other.current; }
|
||||
bool operator!=(const const_pointer_iterator& other) { return current != other.current; }
|
||||
|
||||
friend const_pointer_iterator operator+(const const_pointer_iterator& x, int v) { return const_pointer_iterator(x.current + v); }
|
||||
friend const_pointer_iterator operator-(const const_pointer_iterator& x, int v) { return const_pointer_iterator(x.current - v); }
|
||||
friend const_pointer_iterator operator+(const const_pointer_iterator& x, int v) {
|
||||
return const_pointer_iterator(x.current + v);
|
||||
}
|
||||
friend const_pointer_iterator operator-(const const_pointer_iterator& x, int v) {
|
||||
return const_pointer_iterator(x.current - v);
|
||||
}
|
||||
};
|
||||
|
||||
template < typename T, typename Vec, typename Alloc >
|
||||
@@ -54,11 +64,21 @@ public:
|
||||
rstl::destroy(get_pointer());
|
||||
}
|
||||
}
|
||||
pointer_iterator& operator++() { ++current; return *this; }
|
||||
pointer_iterator& operator--() { --current; return *this; }
|
||||
pointer_iterator& operator++() {
|
||||
++current;
|
||||
return *this;
|
||||
}
|
||||
pointer_iterator& operator--() {
|
||||
--current;
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend pointer_iterator operator+(const pointer_iterator& x, int v) { return pointer_iterator(x.get_pointer() + v); }
|
||||
friend pointer_iterator operator-(const pointer_iterator& x, int v) { return pointer_iterator(x.get_pointer() - v); }
|
||||
friend pointer_iterator operator+(const pointer_iterator& x, int v) {
|
||||
return pointer_iterator(x.get_pointer() + v);
|
||||
}
|
||||
friend pointer_iterator operator-(const pointer_iterator& x, int v) {
|
||||
return pointer_iterator(x.get_pointer() - v);
|
||||
}
|
||||
};
|
||||
} // namespace rstl
|
||||
|
||||
|
||||
@@ -13,4 +13,4 @@ struct less {};
|
||||
template < typename T, typename P, int U, typename S = select1st< P >, typename Cmp = less< T > >
|
||||
class red_black_tree {};
|
||||
}; // namespace rstl
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -9,7 +9,8 @@ namespace rstl {
|
||||
template < typename _CharTp >
|
||||
struct char_traits {};
|
||||
|
||||
template < typename _CharTp, typename Traits = char_traits< _CharTp >, typename Alloc = rmemory_allocator >
|
||||
template < typename _CharTp, typename Traits = char_traits< _CharTp >,
|
||||
typename Alloc = rmemory_allocator >
|
||||
class basic_string {
|
||||
struct COWData {
|
||||
u32 x0_capacity;
|
||||
|
||||
Reference in New Issue
Block a user