Use const in MatroskaCuePositionUpdater::updateSize
This commit is contained in:
parent
7ffb83c4b2
commit
dc32ca77fb
|
@ -206,9 +206,9 @@ bool MatroskaCuePositionUpdater::updateSize(EbmlElement *element, int shift)
|
||||||
// get size info
|
// get size info
|
||||||
uint64 &size = m_sizes.at(element);
|
uint64 &size = m_sizes.at(element);
|
||||||
// calculate new size
|
// calculate new size
|
||||||
uint64 newSize = shift > 0 ? size + static_cast<uint64>(shift) : size - static_cast<uint64>(-shift);
|
const uint64 newSize = shift > 0 ? size + static_cast<uint64>(shift) : size - static_cast<uint64>(-shift);
|
||||||
// shift parent
|
// shift parent
|
||||||
bool updated = updateSize(element->parent(), shift + static_cast<int>(EbmlElement::calculateSizeDenotationLength(newSize)) - static_cast<int>(EbmlElement::calculateSizeDenotationLength(size)));
|
const bool updated = updateSize(element->parent(), shift + static_cast<int>(EbmlElement::calculateSizeDenotationLength(newSize)) - static_cast<int>(EbmlElement::calculateSizeDenotationLength(size)));
|
||||||
// apply new size
|
// apply new size
|
||||||
size = newSize;
|
size = newSize;
|
||||||
return updated;
|
return updated;
|
||||||
|
|
Loading…
Reference in New Issue