mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
chore(array): eliminate sign mismatches
This commit is contained in:
parent
e3b0c356ad
commit
6d1d2eefd9
2 changed files with 7 additions and 7 deletions
|
|
@ -26,7 +26,7 @@ template <class T>
|
|||
uint32_t TSGrowableArray<T>::Add(uint32_t count, const T* data) {
|
||||
this->Reserve(count, 1);
|
||||
|
||||
for (int32_t i = 0; i < count; i++) {
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
T* element = &this->m_data[this->m_count + i];
|
||||
*element = data[i];
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ uint32_t TSGrowableArray<T>::Add(uint32_t count, uint32_t incr, const T* data) {
|
|||
|
||||
const char* dataptr = reinterpret_cast<const char*>(data);
|
||||
|
||||
for (int32_t i = 0; i < count; i++) {
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
T* element = &this->m_data[this->m_count + i];
|
||||
*element = *reinterpret_cast<const T*>(dataptr);
|
||||
dataptr += incr;
|
||||
|
|
@ -129,7 +129,7 @@ void TSGrowableArray<T>::SetCount(uint32_t count) {
|
|||
|
||||
T* element;
|
||||
|
||||
for (int32_t i = this->m_count; i < count; ++i) {
|
||||
for (uint32_t i = this->m_count; i < count; ++i) {
|
||||
element = &this->m_data[i];
|
||||
new (element) T();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue