You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
Reformat all code to coding standard
This commit is contained in:
@ -27,49 +27,55 @@
|
||||
#include "btree.h"
|
||||
#include "btree_container.h"
|
||||
|
||||
namespace btree {
|
||||
namespace btree
|
||||
{
|
||||
|
||||
// The btree_set class is needed mainly for its constructors.
|
||||
template <typename Key,
|
||||
typename Compare = std::less<Key>,
|
||||
typename Alloc = std::allocator<Key>,
|
||||
int TargetNodeSize = 256>
|
||||
class btree_set : public btree_unique_container<
|
||||
btree<btree_set_params<Key, Compare, Alloc, TargetNodeSize> > > {
|
||||
class btree_set : public btree_unique_container <
|
||||
btree<btree_set_params<Key, Compare, Alloc, TargetNodeSize> > >
|
||||
{
|
||||
|
||||
typedef btree_set<Key, Compare, Alloc, TargetNodeSize> self_type;
|
||||
typedef btree_set_params<Key, Compare, Alloc, TargetNodeSize> params_type;
|
||||
typedef btree<params_type> btree_type;
|
||||
typedef btree_unique_container<btree_type> super_type;
|
||||
typedef btree_set<Key, Compare, Alloc, TargetNodeSize> self_type;
|
||||
typedef btree_set_params<Key, Compare, Alloc, TargetNodeSize> params_type;
|
||||
typedef btree<params_type> btree_type;
|
||||
typedef btree_unique_container<btree_type> super_type;
|
||||
|
||||
public:
|
||||
typedef typename btree_type::key_compare key_compare;
|
||||
typedef typename btree_type::allocator_type allocator_type;
|
||||
public:
|
||||
typedef typename btree_type::key_compare key_compare;
|
||||
typedef typename btree_type::allocator_type allocator_type;
|
||||
|
||||
public:
|
||||
// Default constructor.
|
||||
btree_set(const key_compare &comp = key_compare(),
|
||||
const allocator_type &alloc = allocator_type())
|
||||
: super_type(comp, alloc) {
|
||||
}
|
||||
public:
|
||||
// Default constructor.
|
||||
btree_set(const key_compare& comp = key_compare(),
|
||||
const allocator_type& alloc = allocator_type())
|
||||
: super_type(comp, alloc)
|
||||
{
|
||||
}
|
||||
|
||||
// Copy constructor.
|
||||
btree_set(const self_type &x)
|
||||
: super_type(x) {
|
||||
}
|
||||
// Copy constructor.
|
||||
btree_set(const self_type& x)
|
||||
: super_type(x)
|
||||
{
|
||||
}
|
||||
|
||||
// Range constructor.
|
||||
template <class InputIterator>
|
||||
btree_set(InputIterator b, InputIterator e,
|
||||
const key_compare &comp = key_compare(),
|
||||
const allocator_type &alloc = allocator_type())
|
||||
: super_type(b, e, comp, alloc) {
|
||||
}
|
||||
// Range constructor.
|
||||
template <class InputIterator>
|
||||
btree_set(InputIterator b, InputIterator e,
|
||||
const key_compare& comp = key_compare(),
|
||||
const allocator_type& alloc = allocator_type())
|
||||
: super_type(b, e, comp, alloc)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template <typename K, typename C, typename A, int N>
|
||||
inline void swap(btree_set<K, C, A, N> &x, btree_set<K, C, A, N> &y) {
|
||||
x.swap(y);
|
||||
inline void swap(btree_set<K, C, A, N>& x, btree_set<K, C, A, N>& y)
|
||||
{
|
||||
x.swap(y);
|
||||
}
|
||||
|
||||
// The btree_multiset class is needed mainly for its constructors.
|
||||
@ -77,43 +83,48 @@ template <typename Key,
|
||||
typename Compare = std::less<Key>,
|
||||
typename Alloc = std::allocator<Key>,
|
||||
int TargetNodeSize = 256>
|
||||
class btree_multiset : public btree_multi_container<
|
||||
btree<btree_set_params<Key, Compare, Alloc, TargetNodeSize> > > {
|
||||
class btree_multiset : public btree_multi_container <
|
||||
btree<btree_set_params<Key, Compare, Alloc, TargetNodeSize> > >
|
||||
{
|
||||
|
||||
typedef btree_multiset<Key, Compare, Alloc, TargetNodeSize> self_type;
|
||||
typedef btree_set_params<Key, Compare, Alloc, TargetNodeSize> params_type;
|
||||
typedef btree<params_type> btree_type;
|
||||
typedef btree_multi_container<btree_type> super_type;
|
||||
typedef btree_multiset<Key, Compare, Alloc, TargetNodeSize> self_type;
|
||||
typedef btree_set_params<Key, Compare, Alloc, TargetNodeSize> params_type;
|
||||
typedef btree<params_type> btree_type;
|
||||
typedef btree_multi_container<btree_type> super_type;
|
||||
|
||||
public:
|
||||
typedef typename btree_type::key_compare key_compare;
|
||||
typedef typename btree_type::allocator_type allocator_type;
|
||||
public:
|
||||
typedef typename btree_type::key_compare key_compare;
|
||||
typedef typename btree_type::allocator_type allocator_type;
|
||||
|
||||
public:
|
||||
// Default constructor.
|
||||
btree_multiset(const key_compare &comp = key_compare(),
|
||||
const allocator_type &alloc = allocator_type())
|
||||
: super_type(comp, alloc) {
|
||||
}
|
||||
public:
|
||||
// Default constructor.
|
||||
btree_multiset(const key_compare& comp = key_compare(),
|
||||
const allocator_type& alloc = allocator_type())
|
||||
: super_type(comp, alloc)
|
||||
{
|
||||
}
|
||||
|
||||
// Copy constructor.
|
||||
btree_multiset(const self_type &x)
|
||||
: super_type(x) {
|
||||
}
|
||||
// Copy constructor.
|
||||
btree_multiset(const self_type& x)
|
||||
: super_type(x)
|
||||
{
|
||||
}
|
||||
|
||||
// Range constructor.
|
||||
template <class InputIterator>
|
||||
btree_multiset(InputIterator b, InputIterator e,
|
||||
const key_compare &comp = key_compare(),
|
||||
const allocator_type &alloc = allocator_type())
|
||||
: super_type(b, e, comp, alloc) {
|
||||
}
|
||||
// Range constructor.
|
||||
template <class InputIterator>
|
||||
btree_multiset(InputIterator b, InputIterator e,
|
||||
const key_compare& comp = key_compare(),
|
||||
const allocator_type& alloc = allocator_type())
|
||||
: super_type(b, e, comp, alloc)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template <typename K, typename C, typename A, int N>
|
||||
inline void swap(btree_multiset<K, C, A, N> &x,
|
||||
btree_multiset<K, C, A, N> &y) {
|
||||
x.swap(y);
|
||||
inline void swap(btree_multiset<K, C, A, N>& x,
|
||||
btree_multiset<K, C, A, N>& y)
|
||||
{
|
||||
x.swap(y);
|
||||
}
|
||||
|
||||
} // namespace btree
|
||||
|
Reference in New Issue
Block a user