eliminate MSVC71 compiler warnings

This commit is contained in:
Aleksandar Fabijanic 2012-09-12 04:12:50 +00:00
Родитель 62d1782d24
Коммит 98d2240eb1
3 изменённых файлов: 15 добавлений и 11 удалений

Просмотреть файл

@ -338,7 +338,7 @@ private:
{
C* pData = new C;
Column<C>* pCol = new Column<C>(mc, pData);
return new InternalExtraction<C>(*pData, pCol, currentDataSet());
return new InternalExtraction<C>(*pData, pCol, static_cast<Poco::UInt32>(currentDataSet()));
}
template <class C>
@ -346,7 +346,10 @@ private:
{
C* pData = new C;
Column<C>* pCol = new Column<C>(mc, pData);
return new InternalBulkExtraction<C>(*pData, pCol, getExtractionLimit(), currentDataSet());
return new InternalBulkExtraction<C>(*pData,
pCol,
static_cast<Poco::UInt32>(getExtractionLimit()),
static_cast<Poco::UInt32>(currentDataSet()));
}
template <class T>

Просмотреть файл

@ -311,7 +311,7 @@ bool RecordSet::moveLast()
void RecordSet::setRowFormatter(RowFormatter* pRowFormatter)
{
pRowFormatter->setTotalRowCount(getTotalRowCount());
pRowFormatter->setTotalRowCount(static_cast<int>(getTotalRowCount()));
Statement::setRowFormatter(pRowFormatter);
RowMap::iterator it = _rowMap.begin();
RowMap::iterator end = _rowMap.end();
@ -348,7 +348,7 @@ void RecordSet::formatValues(std::size_t offset, std::size_t length) const
std::ostream& RecordSet::copy(std::ostream& os, std::size_t offset, std::size_t length) const
{
RowFormatter& rf = const_cast<RowFormatter&>((*_pBegin)->getFormatter());
rf.setTotalRowCount(getTotalRowCount());
rf.setTotalRowCount(static_cast<int>(getTotalRowCount()));
if (RowFormatter::FORMAT_PROGRESSIVE == rf.getMode())
{
os << rf.prefix();

Просмотреть файл

@ -126,18 +126,19 @@ std::size_t StatementImpl::execute(const bool& reset)
void StatementImpl::assignSubTotal(bool reset)
{
typedef CountVec::iterator IT;
if (_extractors.size() == _subTotalRowCount.size())
{
CountVec::iterator it = _subTotalRowCount.begin();
CountVec::iterator end = _subTotalRowCount.end();
IT it = _subTotalRowCount.begin();
IT end = _subTotalRowCount.end();
for (int counter = 0; it != end; ++it, ++counter)
{
if (_extractors[counter].size())
{
if (reset)
*it += _extractors[counter][0]->numOfRowsHandled();
*it += IT::value_type(_extractors[counter][0]->numOfRowsHandled());
else
*it = _extractors[counter][0]->numOfRowsHandled();
*it = IT::value_type(_extractors[counter][0]->numOfRowsHandled());
}
}
}
@ -434,7 +435,7 @@ void StatementImpl::removeBind(const std::string& name)
std::size_t StatementImpl::columnsExtracted(int dataSet) const
{
if (USE_CURRENT_DATA_SET == dataSet) dataSet = _curDataSet;
if (USE_CURRENT_DATA_SET == dataSet) dataSet = static_cast<int>(_curDataSet);
if (_columnsExtracted.size() > 0)
{
poco_assert (dataSet >= 0 && dataSet < _columnsExtracted.size());
@ -447,7 +448,7 @@ std::size_t StatementImpl::columnsExtracted(int dataSet) const
std::size_t StatementImpl::rowsExtracted(int dataSet) const
{
if (USE_CURRENT_DATA_SET == dataSet) dataSet = _curDataSet;
if (USE_CURRENT_DATA_SET == dataSet) dataSet = static_cast<int>(_curDataSet);
if (extractions().size() > 0)
{
poco_assert (dataSet >= 0 && dataSet < _extractors.size());
@ -461,7 +462,7 @@ std::size_t StatementImpl::rowsExtracted(int dataSet) const
std::size_t StatementImpl::subTotalRowCount(int dataSet) const
{
if (USE_CURRENT_DATA_SET == dataSet) dataSet = _curDataSet;
if (USE_CURRENT_DATA_SET == dataSet) dataSet = static_cast<int>(_curDataSet);
if (_subTotalRowCount.size() > 0)
{
poco_assert (dataSet >= 0 && dataSet < _subTotalRowCount.size());