From b066de22decf2d19e55e9b54811f3482a39c5968 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Fri, 24 Jun 2011 13:30:41 +0200 Subject: Move byte order conversion to traits set_value/set_image functions --- odb/pgsql/traits.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'odb/pgsql/traits.hxx') diff --git a/odb/pgsql/traits.hxx b/odb/pgsql/traits.hxx index a1e3cf6..7d2bce0 100644 --- a/odb/pgsql/traits.hxx +++ b/odb/pgsql/traits.hxx @@ -19,6 +19,7 @@ #include #include +#include namespace odb { @@ -129,7 +130,7 @@ namespace odb set_value (T& v, const image_type& i, bool is_null) { if (!is_null) - v = T (i); + v = T (details::endian_traits::ntoh (i)); else v = T (); } @@ -138,7 +139,7 @@ namespace odb set_image (image_type& i, bool& is_null, T v) { is_null = false; - i = image_type (v); + i = image_type (details::endian_traits::hton (v)); } }; -- cgit v1.1