diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-02-10 15:27:01 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-02-10 15:27:01 +0200 |
commit | de7d733d27c13c482f06b23a5770f0d7657cb04b (patch) | |
tree | 8b681b83a8b17557658a2b02a9e7ebc11ff79ae6 /odb/sqlite/container-statements.txx | |
parent | 896de9d3d468f5f59c28153f5d8559eae7f27901 (diff) |
Don't allocate unnecessary entries in container truncation array
Diffstat (limited to 'odb/sqlite/container-statements.txx')
-rw-r--r-- | odb/sqlite/container-statements.txx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/odb/sqlite/container-statements.txx b/odb/sqlite/container-statements.txx index b6fc52e..a4dd6f4 100644 --- a/odb/sqlite/container-statements.txx +++ b/odb/sqlite/container-statements.txx @@ -39,9 +39,7 @@ namespace odb container_statements_impl (connection_type& conn) : base (conn) { - this->data_image_truncated_ = data_image_truncated_array_; - this->select_image_truncated_ = data_image_truncated_array_ + - traits::id_column_count; + this->select_image_truncated_ = select_image_truncated_array_; this->cond_image_binding_.bind = cond_image_bind_; this->cond_image_binding_.count = traits::cond_column_count; @@ -56,12 +54,13 @@ namespace odb std::memset (cond_image_bind_, 0, sizeof (cond_image_bind_)); std::memset (data_image_bind_, 0, sizeof (data_image_bind_)); - std::memset (data_image_truncated_array_, + std::memset (select_image_truncated_array_, 0, - sizeof (data_image_truncated_array_)); + sizeof (select_image_truncated_array_)); for (std::size_t i (0); i < traits::data_column_count; ++i) - data_image_bind_[i].truncated = data_image_truncated_array_ + i; + data_image_bind_[i + traits::id_column_count].truncated = + select_image_truncated_array_ + i; this->insert_one_text_ = traits::insert_one_statement; this->select_all_text_ = traits::select_all_statement; |