diff options
author | Wohlstand <admin@wohlnet.ru> | 2018-06-03 14:34:21 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2018-06-03 14:34:21 +0300 |
commit | 4cfba5ee6a404e71c3d7b86b7b1ec680c3d7521d (patch) | |
tree | ff9bf122a1bbf00f51e7771e8d68bfd18ccffde1 /src/adlmidi_bankmap.tcc | |
parent | ae11d031fd9e802ccfdc1f2a7678c737fe6f85a9 (diff) | |
download | libADLMIDI-4cfba5ee6a404e71c3d7b86b7b1ec680c3d7521d.tar.gz libADLMIDI-4cfba5ee6a404e71c3d7b86b7b1ec680c3d7521d.tar.bz2 libADLMIDI-4cfba5ee6a404e71c3d7b86b7b1ec680c3d7521d.zip |
Fixed some warnings on MinGW
Diffstat (limited to 'src/adlmidi_bankmap.tcc')
-rw-r--r-- | src/adlmidi_bankmap.tcc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/adlmidi_bankmap.tcc b/src/adlmidi_bankmap.tcc index 9303f0d..76e7001 100644 --- a/src/adlmidi_bankmap.tcc +++ b/src/adlmidi_bankmap.tcc @@ -49,15 +49,16 @@ void BasicBankMap<T>::reserve(size_t capacity) return; size_t need = capacity - m_capacity; - need = (need < minimum_allocation) ? minimum_allocation : need; + const size_t minalloc = static_cast<size_t>(minimum_allocation); + need = (need < minalloc) ? minalloc : need; - AdlMIDI_SPtrArray<Slot> slots; - slots.reset(new Slot[need]); - m_allocations.push_back(slots); + AdlMIDI_SPtrArray<Slot> slotz; + slotz.reset(new Slot[need]); + m_allocations.push_back(slotz); m_capacity += need; for(size_t i = need; i-- > 0;) - free_slot(&slots[i]); + free_slot(&slotz[i]); } template <class T> |