mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-12 05:58:15 -04:00
Remove more tabs
This commit is contained in:
parent
8495871940
commit
a6ef114dca
@ -16,7 +16,7 @@ constexpr const size_t STAT_FLAG_HIDDEN = 0x2;
|
||||
constexpr const size_t STAT_FLAG_SYSTEM = 0x2;
|
||||
|
||||
struct stat_info {
|
||||
size_t flags;
|
||||
size_t flags;
|
||||
size_t size;
|
||||
datetime created;
|
||||
datetime modified;
|
||||
|
@ -11,8 +11,8 @@
|
||||
#include <types.hpp>
|
||||
|
||||
struct statfs_info {
|
||||
size_t total_size;
|
||||
size_t free_size;
|
||||
size_t total_size;
|
||||
size_t free_size;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -22,22 +22,22 @@ struct head_base;
|
||||
|
||||
template<size_t I, typename H>
|
||||
struct head_base<I, H, true> : H {
|
||||
head_base() : H(){}
|
||||
head_base(const H& h) : H(h){}
|
||||
head_base() : H(){}
|
||||
head_base(const H& h) : H(h){}
|
||||
|
||||
static H& head(head_base& b){ return b; }
|
||||
static const H& head(const head_base& b){ return b; }
|
||||
static H& head(head_base& b){ return b; }
|
||||
static const H& head(const head_base& b){ return b; }
|
||||
};
|
||||
|
||||
template<size_t I, typename H>
|
||||
struct head_base<I, H, false> {
|
||||
H head_impl;
|
||||
H head_impl;
|
||||
|
||||
head_base() : head_impl(){}
|
||||
head_base(const H& h) : head_impl(h){}
|
||||
head_base() : head_impl(){}
|
||||
head_base(const H& h) : head_impl(h){}
|
||||
|
||||
static H& head(head_base& b){ return b.head_impl; }
|
||||
static const H& head(const head_base& b){ return b.head_impl; }
|
||||
static H& head(head_base& b){ return b.head_impl; }
|
||||
static const H& head(const head_base& b){ return b.head_impl; }
|
||||
};
|
||||
|
||||
/* Tuple implementation */
|
||||
@ -50,26 +50,26 @@ struct tuple_impl<I> {};
|
||||
|
||||
template<size_t I, typename H, typename... E>
|
||||
struct tuple_impl<I, H, E...> : public tuple_impl<I + 1, E...>, private head_base<I, H, __is_empty(H)> {
|
||||
typedef tuple_impl<I + 1, E...> parent_t;
|
||||
typedef head_base<I, H, __is_empty(H)> base_parent_t;
|
||||
typedef tuple_impl<I + 1, E...> parent_t;
|
||||
typedef head_base<I, H, __is_empty(H)> base_parent_t;
|
||||
|
||||
tuple_impl() : parent_t(), base_parent_t() {}
|
||||
tuple_impl() : parent_t(), base_parent_t() {}
|
||||
|
||||
explicit tuple_impl(const H& head, const E&... elements): parent_t(elements...), base_parent_t(head) {}
|
||||
explicit tuple_impl(const H& head, const E&... elements): parent_t(elements...), base_parent_t(head) {}
|
||||
|
||||
static H& head(tuple_impl& t){ return base_parent_t::head(t); }
|
||||
static const H& head(const tuple_impl& t){ return base_parent_t::head(t); }
|
||||
static H& head(tuple_impl& t){ return base_parent_t::head(t); }
|
||||
static const H& head(const tuple_impl& t){ return base_parent_t::head(t); }
|
||||
};
|
||||
|
||||
/* tuple class */
|
||||
|
||||
template<typename... E>
|
||||
struct tuple : tuple_impl<0, E...> {
|
||||
typedef tuple_impl<0, E...> parent_t;
|
||||
typedef tuple_impl<0, E...> parent_t;
|
||||
|
||||
tuple() : parent_t(){}
|
||||
tuple() : parent_t(){}
|
||||
|
||||
explicit tuple(const E&... elements): parent_t(elements...) {}
|
||||
explicit tuple(const E&... elements): parent_t(elements...) {}
|
||||
};
|
||||
|
||||
/* Helper to get the type of a tuple */
|
||||
@ -82,32 +82,32 @@ struct tuple_element<I, tuple<H, T...>> : tuple_element<I - 1, tuple<T...>> { };
|
||||
|
||||
template<typename H, typename... T>
|
||||
struct tuple_element<0, tuple<H, T...>> {
|
||||
typedef H type;
|
||||
typedef H type;
|
||||
};
|
||||
|
||||
template<int I, typename H, typename... T>
|
||||
inline H& get_helper(tuple_impl<I, H, T...>& t){
|
||||
return tuple_impl<I, H, T...>::head(t);
|
||||
return tuple_impl<I, H, T...>::head(t);
|
||||
}
|
||||
|
||||
template<int I, typename H, typename... T>
|
||||
inline const H& get_helper(const tuple_impl<I, H, T...>& t) {
|
||||
return tuple_impl<I, H, T...>::head(t);
|
||||
return tuple_impl<I, H, T...>::head(t);
|
||||
}
|
||||
|
||||
template<int I, typename... E>
|
||||
inline typename tuple_element<I, tuple<E...> >::type& get(tuple<E...>& t){
|
||||
return get_helper<I>(t);
|
||||
return get_helper<I>(t);
|
||||
}
|
||||
|
||||
template<int I, typename... E>
|
||||
inline const typename tuple_element<I, tuple<E...> >::type get(const tuple<E...>& t){
|
||||
return get_helper<I>(t);
|
||||
return get_helper<I>(t);
|
||||
}
|
||||
|
||||
template<typename... E>
|
||||
inline tuple<E...> make_tuple(E... args){
|
||||
return tuple<E...>(args...);
|
||||
return tuple<E...>(args...);
|
||||
}
|
||||
|
||||
} //end of namespace std
|
||||
|
Loading…
x
Reference in New Issue
Block a user