ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cf.schmorp.de/Deliantra-Client/salloc.h
(Generate patch)

Comparing cf.schmorp.de/Deliantra-Client/salloc.h (file contents):
Revision 1.1 by root, Mon Nov 19 01:23:01 2018 UTC vs.
Revision 1.2 by root, Mon Nov 19 01:37:28 2018 UTC

10 slice_allocator () noexcept { } 10 slice_allocator () noexcept { }
11 template<typename Tp2> 11 template<typename Tp2>
12 slice_allocator (const slice_allocator<Tp2> &) noexcept { } 12 slice_allocator (const slice_allocator<Tp2> &) noexcept { }
13 ~slice_allocator () noexcept { } 13 ~slice_allocator () noexcept { }
14 14
15 template <class U>
16 bool operator == (const slice_allocator<U> &) noexcept { return true ; }
17 template <class U>
18 bool operator != (const slice_allocator<U> &) noexcept { return false; }
19
15 Tp *allocate (std::size_t n) 20 Tp *allocate (std::size_t n)
16 { 21 {
17 return (Tp *)g_slice_alloc (n * sizeof (Tp)); 22 return (Tp *)g_slice_alloc (n * sizeof (Tp));
18 } 23 }
19 24
21 { 26 {
22 g_slice_free1 (n * sizeof (Tp), p); 27 g_slice_free1 (n * sizeof (Tp), p);
23 } 28 }
24}; 29};
25 30
26template <class T, class U>
27bool operator == (const slice_allocator<T>&, const slice_allocator<U>&) noexcept { return true ; }
28template <class T, class U>
29bool operator != (const slice_allocator<T>&, const slice_allocator<U>&) noexcept { return false; }
30
31#endif 31#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines