aboutsummaryrefslogtreecommitdiffstats
path: root/src/Buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Buffer.h')
-rw-r--r--src/Buffer.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Buffer.h b/src/Buffer.h
index 4bb157b..c4c73ce 100644
--- a/src/Buffer.h
+++ b/src/Buffer.h
@@ -20,14 +20,14 @@
along with ODR-DabMod. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef BUFFER_H
-#define BUFFER_H
+#pragma once
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <unistd.h>
+#include <memory>
/* Buffer is a container for a byte array, that is memcpy'ed
* on assignment and by the copy-constructor.
@@ -48,6 +48,8 @@ class Buffer {
void *data;
public:
+ using sptr = std::shared_ptr<Buffer>;
+
Buffer(const Buffer& copy);
Buffer(size_t len = 0, const void *data = NULL);
~Buffer();
@@ -71,5 +73,3 @@ class Buffer {
void *getData() const { return data; }
};
-#endif // BUFFER_H
-