Buildsystem/MSVC: Warning fixes

C4800 'type' : forcing value to bool 'true' or 'false' (performance warning)
C4127 conditional expression is constant
This commit is contained in:
Shauren
2014-07-17 15:42:57 +02:00
parent 345bed25d2
commit 7532864264
104 changed files with 386 additions and 387 deletions

View File

@@ -105,10 +105,10 @@ m_length(NULL)
for (uint64 fIndex = 0; fIndex < m_fieldCount; ++fIndex)
{
if (!*m_rBind[fIndex].is_null)
m_rows[uint32(m_rowPosition)][fIndex].SetByteValue( m_rBind[fIndex].buffer,
m_rows[uint32(m_rowPosition)][fIndex].SetByteValue(m_rBind[fIndex].buffer,
m_rBind[fIndex].buffer_length,
m_rBind[fIndex].buffer_type,
*m_rBind[fIndex].length );
*m_rBind[fIndex].length);
else
switch (m_rBind[fIndex].buffer_type)
{
@@ -118,16 +118,16 @@ m_length(NULL)
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_VAR_STRING:
m_rows[uint32(m_rowPosition)][fIndex].SetByteValue( "",
m_rows[uint32(m_rowPosition)][fIndex].SetByteValue("",
m_rBind[fIndex].buffer_length,
m_rBind[fIndex].buffer_type,
*m_rBind[fIndex].length );
*m_rBind[fIndex].length);
break;
default:
m_rows[uint32(m_rowPosition)][fIndex].SetByteValue( 0,
m_rows[uint32(m_rowPosition)][fIndex].SetByteValue(0,
m_rBind[fIndex].buffer_length,
m_rBind[fIndex].buffer_type,
*m_rBind[fIndex].length );
*m_rBind[fIndex].length);
}
}
m_rowPosition++;
@@ -186,15 +186,8 @@ bool PreparedResultSet::_NextRow()
if (m_rowPosition >= m_rowCount)
return false;
int retval = mysql_stmt_fetch( m_stmt );
if (!retval || retval == MYSQL_DATA_TRUNCATED)
retval = true;
if (retval == MYSQL_NO_DATA)
retval = false;
return retval;
int retval = mysql_stmt_fetch(m_stmt);
return retval == 0 || retval == MYSQL_DATA_TRUNCATED;
}
void ResultSet::CleanUp()