Fixed an issue with memmove in FixedOrderedMultimap
This commit is contained in:
parent
8c722feafb
commit
e963aca02a
@ -48,7 +48,7 @@ private:
|
|||||||
if (_size <= position) {
|
if (_size <= position) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
memmove(&theMap[position], &theMap[position + 1],
|
memmove(static_cast<void*>(&theMap[position]), static_cast<void*>(&theMap[position + 1]),
|
||||||
(_size - position - 1) * sizeof(std::pair<key_t,T>));
|
(_size - position - 1) * sizeof(std::pair<key_t,T>));
|
||||||
--_size;
|
--_size;
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ public:
|
|||||||
return MAP_FULL;
|
return MAP_FULL;
|
||||||
}
|
}
|
||||||
uint32_t position = findNicePlace(key);
|
uint32_t position = findNicePlace(key);
|
||||||
memmove(&theMap[position + 1], &theMap[position],
|
memmove(static_cast<void*>(&theMap[position + 1]),static_cast<void*>(&theMap[position]),
|
||||||
(_size - position) * sizeof(std::pair<key_t,T>));
|
(_size - position) * sizeof(std::pair<key_t,T>));
|
||||||
theMap[position].first = key;
|
theMap[position].first = key;
|
||||||
theMap[position].second = value;
|
theMap[position].second = value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user