diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-12-07 12:53:37 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-12-07 12:53:37 +0200 |
commit | dcd5b13e6ab849ebd812f794a18654a90631b42f (patch) | |
tree | a50bcba114df99729075da12d3765738c694c9d5 | |
parent | 61fc247f34255796f5535b52626074b4f92b6bb4 (diff) |
Use mutable instead of const_cast
-rw-r--r-- | odb/mysql/query.cxx | 4 | ||||
-rw-r--r-- | odb/mysql/query.hxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/odb/mysql/query.cxx b/odb/mysql/query.cxx index 2aefeea..542f827 100644 --- a/odb/mysql/query.cxx +++ b/odb/mysql/query.cxx @@ -85,12 +85,12 @@ namespace odb parameters () const { size_t n (parameters_.size ()); - binding& r (const_cast<binding&> (binding_)); + binding& r (binding_); if (n == 0) return r; // r.bind and r.count should be 0. - MYSQL_BIND* b (const_cast<MYSQL_BIND*> (&bind_[0])); + MYSQL_BIND* b (&bind_[0]); bool inc_ver (false); diff --git a/odb/mysql/query.hxx b/odb/mysql/query.hxx index 9deb6a7..9cb6bb9 100644 --- a/odb/mysql/query.hxx +++ b/odb/mysql/query.hxx @@ -191,8 +191,8 @@ namespace odb std::string clause_; parameters_type parameters_; - std::vector<MYSQL_BIND> bind_; - binding binding_; + mutable std::vector<MYSQL_BIND> bind_; + mutable binding binding_; }; inline query |