Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Data/DataTable.cpp (1 of 27 files). Show all
Unified · Split
| @@ -52,7 +52,7 @@ const string& DataTable::Name() const · 51 unmodified lines | ||
| 52 | 52 | |
| 53 | 53 | void DataTable::AddColumn(DataColumnPtr column) |
| 54 | 54 | { |
| 55 | − column->m_index = m_columns.size(); | |
| 55 | + column->m_index = ConvertInt32(m_columns.size()); | |
| 56 | 56 | m_columnIndexes.insert(pair<string, int32_t>(column->Name(), column->m_index)); |
| 57 | 57 | m_columns.push_back(std::move(column)); |
| 58 | 58 | } |
| @@ -69,7 +69,7 @@ const DataColumnPtr& DataTable::Column(const string& columnName) const · 10 unmodified lines | ||
| 69 | 69 | |
| 70 | 70 | const DataColumnPtr& DataTable::Column(int32_t index) const |
| 71 | 71 | { |
| 72 | − if (index < 0 || index >= static_cast<int32_t>(m_columns.size())) | |
| 72 | + if (index < 0 || index >= ConvertInt32(m_columns.size())) | |
| 73 | 73 | return DataColumn::NullPtr; |
| 74 | 74 | |
| 75 | 75 | return m_columns[index]; |
| @@ -97,12 +97,12 @@ DataColumnPtr DataTable::CloneColumn(const DataColumnPtr& source) · 21 unmodified lines | ||
| 97 | 97 | |
| 98 | 98 | int32_t DataTable::ColumnCount() const |
| 99 | 99 | { |
| 100 | − return m_columns.size(); | |
| 100 | + return ConvertInt32(m_columns.size()); | |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | const DataRowPtr& DataTable::Row(int32_t index) |
| 104 | 104 | { |
| 105 | − if (index < 0 || index >= static_cast<int32_t>(m_rows.size())) | |
| 105 | + if (index < 0 || index >= ConvertInt32(m_rows.size())) | |
| 106 | 106 | return DataRow::NullPtr; |
| 107 | 107 | |
| 108 | 108 | return m_rows[index]; |
| @@ -121,8 +121,9 @@ DataRowPtr DataTable::CreateRow() · 12 unmodified lines | ||
| 121 | 121 | DataRowPtr DataTable::CloneRow(const DataRowPtr& source) |
| 122 | 122 | { |
| 123 | 123 | DataRowPtr row = CreateRow(); |
| 124 | + const int32_t columnCount = ConvertInt32(m_columns.size()); | |
| 124 | 125 | |
| 125 | − for (size_t i = 0; i < m_columns.size(); i++) | |
| 126 | + for (int32_t i = 0; i < columnCount; i++) | |
| 126 | 127 | { |
| 127 | 128 | switch (m_columns[i]->m_type) |
| 128 | 129 | { |
| @@ -181,5 +182,5 @@ DataRowPtr DataTable::CloneRow(const DataRowPtr& source) · 52 unmodified lines | ||
| 181 | 182 | |
| 182 | 183 | int32_t DataTable::RowCount() const |
| 183 | 184 | { |
| 184 | − return m_rows.size(); | |
| 185 | + return ConvertInt32(m_rows.size()); | |
| 185 | 186 | } |