@@ -486,12 +486,12 @@ m_metadataResult(result)
486486 return ;
487487 }
488488
489- m_rows.resize (uint32 (m_rowCount) * m_fieldCount);
489+ m_rows.resize (std::size_t (m_rowCount) * m_fieldCount);
490490 while (_NextRow ())
491491 {
492492 for (uint32 fIndex = 0 ; fIndex < m_fieldCount; ++fIndex )
493493 {
494- m_rows[uint32 (m_rowPosition) * m_fieldCount + fIndex ].SetMetadata (&m_fieldMetadata[fIndex ]);
494+ m_rows[std::size_t (m_rowPosition) * m_fieldCount + fIndex ].SetMetadata (&m_fieldMetadata[fIndex ]);
495495
496496 unsigned long buffer_length = m_rBind[fIndex ].buffer_length ;
497497 unsigned long fetched_length = *m_rBind[fIndex ].length ;
@@ -518,7 +518,7 @@ m_metadataResult(result)
518518 break ;
519519 }
520520
521- m_rows[uint32 (m_rowPosition) * m_fieldCount + fIndex ].SetValue (
521+ m_rows[std::size_t (m_rowPosition) * m_fieldCount + fIndex ].SetValue (
522522 (char const *)buffer,
523523 fetched_length);
524524
@@ -527,7 +527,7 @@ m_metadataResult(result)
527527 }
528528 else
529529 {
530- m_rows[uint32 (m_rowPosition) * m_fieldCount + fIndex ].SetValue (
530+ m_rows[std::size_t (m_rowPosition) * m_fieldCount + fIndex ].SetValue (
531531 nullptr ,
532532 *m_rBind[fIndex ].length );
533533 }
@@ -552,12 +552,10 @@ PreparedResultSet::~PreparedResultSet()
552552
553553bool ResultSet::NextRow ()
554554{
555- MYSQL_ROW row;
556-
557555 if (!_result)
558556 return false ;
559557
560- row = mysql_fetch_row (_result);
558+ MYSQL_ROW row = mysql_fetch_row (_result);
561559 if (!row)
562560 {
563561 CleanUp ();
@@ -616,21 +614,33 @@ void ResultSet::CleanUp()
616614
617615Field const & ResultSet::operator [](std::size_t index) const
618616{
619- ASSERT (index < _fieldCount);
617+ ASSERT (index < std::size_t ( _fieldCount) );
620618 return _currentRow[index];
621619}
622620
621+ QueryResultFieldMetadata const & ResultSet::GetFieldMetadata (std::size_t index) const
622+ {
623+ ASSERT (index < std::size_t (_fieldCount));
624+ return _fieldMetadata[index];
625+ }
626+
623627Field* PreparedResultSet::Fetch () const
624628{
625629 ASSERT (m_rowPosition < m_rowCount);
626- return const_cast <Field*>(&m_rows[uint32 (m_rowPosition) * m_fieldCount]);
630+ return const_cast <Field*>(&m_rows[std::size_t (m_rowPosition) * m_fieldCount]);
627631}
628632
629633Field const & PreparedResultSet::operator [](std::size_t index) const
630634{
631635 ASSERT (m_rowPosition < m_rowCount);
632- ASSERT (index < m_fieldCount);
633- return m_rows[uint32 (m_rowPosition) * m_fieldCount + index];
636+ ASSERT (index < std::size_t (m_fieldCount));
637+ return m_rows[std::size_t (m_rowPosition) * m_fieldCount + index];
638+ }
639+
640+ QueryResultFieldMetadata const & PreparedResultSet::GetFieldMetadata (std::size_t index) const
641+ {
642+ ASSERT (index < std::size_t (m_fieldCount));
643+ return m_fieldMetadata[index];
634644}
635645
636646void PreparedResultSet::CleanUp ()
0 commit comments