From c3a22b9fc707fc9c07096515563e4dd140a335d7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 14 Sep 2012 12:49:07 +0200 Subject: Use memset instead of nil_generator The nil_generator.hpp header is not available in earlier versions. --- odb/boost/uuid/mssql/uuid-traits.hxx | 5 ++--- odb/boost/uuid/mysql/uuid-traits.hxx | 5 ++--- odb/boost/uuid/oracle/uuid-traits.hxx | 5 ++--- odb/boost/uuid/pgsql/uuid-traits.hxx | 5 ++--- odb/boost/uuid/sqlite/uuid-traits.hxx | 5 ++--- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/odb/boost/uuid/mssql/uuid-traits.hxx b/odb/boost/uuid/mssql/uuid-traits.hxx index 70efbb4..d92a5a9 100644 --- a/odb/boost/uuid/mssql/uuid-traits.hxx +++ b/odb/boost/uuid/mssql/uuid-traits.hxx @@ -13,10 +13,9 @@ #include -#include // std::memcpy +#include // std::memcpy, std::memset #include -#include #include @@ -38,7 +37,7 @@ namespace odb if (!is_null) std::memcpy (v.data, &i, 16); else - v = ::boost::uuids::nil_uuid (); + std::memset (v.data, 0, 16); } static void diff --git a/odb/boost/uuid/mysql/uuid-traits.hxx b/odb/boost/uuid/mysql/uuid-traits.hxx index 47d5fce..30af53f 100644 --- a/odb/boost/uuid/mysql/uuid-traits.hxx +++ b/odb/boost/uuid/mysql/uuid-traits.hxx @@ -13,11 +13,10 @@ #include -#include // std::memcpy +#include // std::memcpy, std::memset #include #include -#include #include @@ -44,7 +43,7 @@ namespace odb std::memcpy (v.data, b.data (), 16); } else - v = ::boost::uuids::nil_uuid (); + std::memset (v.data, 0, 16); } static void diff --git a/odb/boost/uuid/oracle/uuid-traits.hxx b/odb/boost/uuid/oracle/uuid-traits.hxx index 822165f..1409203 100644 --- a/odb/boost/uuid/oracle/uuid-traits.hxx +++ b/odb/boost/uuid/oracle/uuid-traits.hxx @@ -13,11 +13,10 @@ #include -#include // std::memcpy +#include // std::memcpy, std::memset #include #include -#include #include @@ -42,7 +41,7 @@ namespace odb std::memcpy (v.data, b, 16); } else - v = ::boost::uuids::nil_uuid (); + std::memset (v.data, 0, 16); } static void diff --git a/odb/boost/uuid/pgsql/uuid-traits.hxx b/odb/boost/uuid/pgsql/uuid-traits.hxx index 675452c..e42e60e 100644 --- a/odb/boost/uuid/pgsql/uuid-traits.hxx +++ b/odb/boost/uuid/pgsql/uuid-traits.hxx @@ -13,10 +13,9 @@ #include -#include // std::memcpy +#include // std::memcpy, std::memset #include -#include #include @@ -38,7 +37,7 @@ namespace odb if (!is_null) std::memcpy (v.data, i, 16); else - v = ::boost::uuids::nil_uuid (); + std::memset (v.data, 0, 16); } static void diff --git a/odb/boost/uuid/sqlite/uuid-traits.hxx b/odb/boost/uuid/sqlite/uuid-traits.hxx index 2b11b4e..92d005c 100644 --- a/odb/boost/uuid/sqlite/uuid-traits.hxx +++ b/odb/boost/uuid/sqlite/uuid-traits.hxx @@ -13,11 +13,10 @@ #include -#include // std::memcpy +#include // std::memcpy, std::memset #include #include -#include #include @@ -44,7 +43,7 @@ namespace odb std::memcpy (v.data, b.data (), 16); } else - v = ::boost::uuids::nil_uuid (); + std::memset (v.data, 0, 16); } static void -- cgit v1.1