diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-18 18:26:33 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-18 18:26:33 +0200 |
commit | dce5d0658e67ced4d5fa64f98f598b86917927a7 (patch) | |
tree | e910d86848a672ef4d0e3977d351e21d3f633227 /odb/buffer.cxx | |
parent | 854af2dbb1ee01f6e1c8d4f8f513ff2bad7da4f0 (diff) |
Move buffer to the details namespace
Diffstat (limited to 'odb/buffer.cxx')
-rw-r--r-- | odb/buffer.cxx | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/odb/buffer.cxx b/odb/buffer.cxx deleted file mode 100644 index f920258..0000000 --- a/odb/buffer.cxx +++ /dev/null @@ -1,34 +0,0 @@ -// file : odb/buffer.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#include <cstring> // std::memcpy - -#include <odb/buffer.hxx> - -using namespace std; - -namespace odb -{ - void buffer:: - capacity (size_t c, size_t data_size) - { - if (c > capacity_) - { - size_t n (capacity_ * 2 > c ? capacity_ * 2 : c); - char* d (static_cast<char*> (operator new (n))); - - if (data_ != 0) - { - if (data_size != 0) - memcpy (d, data_, data_size); - - operator delete (data_); - } - - data_ = d; - capacity_ = n; - } - } -} |