From 3a160a80c788d81e48acf19a2cf68f29cf125dae Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 25 Jan 2024 18:52:59 +0300 Subject: Turn libodb-mysql repository into package for muti-package repository --- libodb-mysql/odb/mysql/enum.cxx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 libodb-mysql/odb/mysql/enum.cxx (limited to 'libodb-mysql/odb/mysql/enum.cxx') diff --git a/libodb-mysql/odb/mysql/enum.cxx b/libodb-mysql/odb/mysql/enum.cxx new file mode 100644 index 0000000..1e53b29 --- /dev/null +++ b/libodb-mysql/odb/mysql/enum.cxx @@ -0,0 +1,28 @@ +// file : odb/mysql/enums.cxx +// license : GNU GPL v2; see accompanying LICENSE file + +#include // std::memmove +#include + +#include + +namespace odb +{ + namespace mysql + { + void enum_traits:: + strip_value (const details::buffer& i, unsigned long& size) + { + char* d (const_cast (i.data ())); + + unsigned long p (0); + for (; p < size && d[p] != ' '; ++p) ; + assert (p != size); + + p++; // Skip space; + size -= p; + + std::memmove (d, d + p, size); + } + } +} -- cgit v1.1