File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 21
21
#include " cbuf.h"
22
22
23
23
cbuf::cbuf (size_t size)
24
- : next(NULL ), _size(size + 1 ), _buf(new char [size + 1 ]),
25
- _bufend(_buf + size + 1 ), _begin(_buf), _end(_begin) {}
24
+ : next(NULL ), _size(size + 1 ), _buf(new char [size + 1 ]),
25
+ _bufend(_buf + size + 1 ), _begin(_buf), _end(_begin) {}
26
26
27
- cbuf::~cbuf () { delete[] _buf; }
27
+ cbuf::~cbuf () {
28
+ delete[] _buf;
29
+ }
28
30
29
- size_t cbuf::resizeAdd (size_t addSize) { return resize (_size + addSize); }
31
+ size_t cbuf::resizeAdd (size_t addSize) {
32
+ return resize (_size + addSize);
33
+ }
30
34
31
35
size_t cbuf::resize (size_t newSize) {
32
36
@@ -68,7 +72,9 @@ size_t cbuf::available() const {
68
72
return _size - (_begin - _end);
69
73
}
70
74
71
- size_t cbuf::size () { return _size; }
75
+ size_t cbuf::size () {
76
+ return _size;
77
+ }
72
78
73
79
size_t cbuf::room () const {
74
80
if (_end >= _begin) {
You can’t perform that action at this time.
0 commit comments