aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/details/buffer.hxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/odb/details/buffer.hxx b/odb/details/buffer.hxx
index 6102c7b..8f0dc83 100644
--- a/odb/details/buffer.hxx
+++ b/odb/details/buffer.hxx
@@ -26,8 +26,8 @@ namespace odb
operator delete (data_);
}
- basic_buffer_base ()
- : capacity_ (512)
+ basic_buffer_base (std::size_t capacity)
+ : capacity_ (capacity)
{
data_ = operator new (capacity_);
}
@@ -51,6 +51,11 @@ namespace odb
{
public:
+ basic_buffer (std::size_t capacity = 256)
+ : basic_buffer_base (capacity)
+ {
+ }
+
T*
data ()
{