comparison liboctave/oct-locbuf.h @ 11586:12df7854fa7c

strip trailing whitespace from source files
author John W. Eaton <jwe@octave.org>
date Thu, 20 Jan 2011 17:24:59 -0500
parents fd0a3ac60b0e
children 5f8bc2f145f5
comparison
equal deleted inserted replaced
11585:1473d0cf86d2 11586:12df7854fa7c
32 template <class T> 32 template <class T>
33 class octave_local_buffer 33 class octave_local_buffer
34 { 34 {
35 public: 35 public:
36 octave_local_buffer (size_t size) 36 octave_local_buffer (size_t size)
37 : data (0) 37 : data (0)
38 { 38 {
39 if (size) 39 if (size)
40 data = new T[size]; 40 data = new T[size];
41 } 41 }
42 ~octave_local_buffer (void) { delete [] data; } 42 ~octave_local_buffer (void) { delete [] data; }
43 operator T *() const { return data; } 43 operator T *() const { return data; }
44 44
45 private: 45 private:
172 172
173 #define OCTAVE_LOCAL_BUFFER(T, buf, size) \ 173 #define OCTAVE_LOCAL_BUFFER(T, buf, size) \
174 octave_local_buffer<T> _buffer_ ## buf (size); \ 174 octave_local_buffer<T> _buffer_ ## buf (size); \
175 T *buf = _buffer_ ## buf 175 T *buf = _buffer_ ## buf
176 176
177 #endif 177 #endif
178 178
179 // Yeah overloading macros would be nice. 179 // Yeah overloading macros would be nice.
180 // Note: we use weird variables in the for loop to avoid warnings about 180 // Note: we use weird variables in the for loop to avoid warnings about
181 // shadowed parameters. 181 // shadowed parameters.
182 #define OCTAVE_LOCAL_BUFFER_INIT(T, buf, size, value) \ 182 #define OCTAVE_LOCAL_BUFFER_INIT(T, buf, size, value) \