aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/traits.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-12-22 12:48:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-12-22 12:48:20 +0200
commit8fa47fed49fdb13b857c63f721edd9c55688a588 (patch)
treecaa89b95db49e9be8b5d930ddd28aa7ac83e2feb /odb/oracle/traits.cxx
parent0d59e889e52c9495e42492b74b99076e3b3f3361 (diff)
Truncate excess data instead of asserting, make small functions inline
Diffstat (limited to 'odb/oracle/traits.cxx')
-rw-r--r--odb/oracle/traits.cxx84
1 files changed, 0 insertions, 84 deletions
diff --git a/odb/oracle/traits.cxx b/odb/oracle/traits.cxx
index 8c0f236..eabfe28 100644
--- a/odb/oracle/traits.cxx
+++ b/odb/oracle/traits.cxx
@@ -12,90 +12,6 @@ namespace odb
namespace oracle
{
//
- // string_value_traits
- //
-
- void string_value_traits::
- set_image (char* b,
- size_t c,
- size_t& n,
- bool& is_null,
- const string& v)
- {
- is_null = false;
- n = v.size ();
-
- assert (n <= c);
-
- if (n != 0 && n <= c)
- memcpy (b, v.c_str (), n);
- }
-
- //
- // c_string_value_traits
- //
-
- void c_string_value_traits::
- set_image (char* b,
- size_t c,
- size_t& n,
- bool& is_null,
- const char* v)
- {
- is_null = false;
- n = strlen (v);
-
- assert (n <= c);
-
- if (n != 0 && n <= c)
- memcpy (b, v, n);
- }
-
- //
- // default_value_traits<vector<char>, id_raw>
- //
-
- void default_value_traits<vector<char>, id_raw>::
- set_image (char* b,
- size_t c,
- size_t& n,
- bool& is_null,
- const value_type& v)
- {
- is_null = false;
- n = v.size ();
-
- assert (n <= c);
-
- // std::vector::data() may not be available in older compilers.
- //
- if (n != 0)
- memcpy (b, &v.front (), n);
- }
-
- //
- // default_value_traits<vector<unsigned char>, id_raw>
- //
-
- void default_value_traits<vector<unsigned char>, id_raw>::
- set_image (char* b,
- size_t c,
- size_t& n,
- bool& is_null,
- const value_type& v)
- {
- is_null = false;
- n = v.size ();
-
- assert (n <= c);
-
- // std::vector::data() may not be available in older compilers.
- //
- if (n != 0)
- memcpy (b, &v.front (), n);
- }
-
- //
// string_lob_value_traits
//