aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-02-12 05:42:19 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-02-12 05:42:19 +0200
commit9ecb6dc37b2843c61de0bd7978f74bb30d779528 (patch)
tree0b7587d6c5ba7286b5bed44002692b2458eabd27
parent3ffac6eb9deee851b5e792127916a1ac7552b2a0 (diff)
Suppress cast warnings
-rw-r--r--odb/qt/containers/list-traits.txx7
1 files changed, 4 insertions, 3 deletions
diff --git a/odb/qt/containers/list-traits.txx b/odb/qt/containers/list-traits.txx
index f579071..2893236 100644
--- a/odb/qt/containers/list-traits.txx
+++ b/odb/qt/containers/list-traits.txx
@@ -17,6 +17,7 @@ namespace odb
for (std::size_t i (0), n (impl.size ()); i < n; ++i)
{
vector_impl::element_state_type s (impl.state (i));
+ index_type ii (static_cast<index_type> (i));
switch (s)
{
@@ -26,19 +27,19 @@ namespace odb
}
case vector_impl::state_inserted:
{
- f.insert (i, c[static_cast<index_type> (i)]);
+ f.insert (ii, c[ii]);
u = u || true;
break;
}
case vector_impl::state_updated:
{
- f.update (i, c[static_cast<index_type> (i)]);
+ f.update (ii, c[ii]);
u = u || true;
break;
}
case vector_impl::state_erased:
{
- f.delete_ (i); // Delete from i onwards.
+ f.delete_ (ii); // Delete from i onwards.
u = u || true;
break;
}