Avoid compiler warnings due to differences in signs in comparisons
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@671 a6f86f6d-0131-4f8e-9e7b-e335508773d5
This commit is contained in:
@@ -49,7 +49,7 @@ START_LIBEBML_NAMESPACE
|
||||
*/
|
||||
int CodedSizeLength(uint64 Length, unsigned int SizeLength, bool bSizeFinite)
|
||||
{
|
||||
int CodedSize;
|
||||
unsigned int CodedSize;
|
||||
if (bSizeFinite) {
|
||||
// prepare the head of the size (000...01xxxxxx)
|
||||
// optimal size
|
||||
@@ -587,7 +587,7 @@ filepos_t EbmlElement::Render(IOCallback & output, bool bWithDefault, bool bKeep
|
||||
filepos_t result = RenderHead(output, bForceRender, bWithDefault, bKeepPosition);
|
||||
uint64 WrittenSize = RenderData(output, bForceRender, bWithDefault);
|
||||
#if defined(_DEBUG) || defined(DEBUG)
|
||||
if (SupposedSize != (0-1)) assert(WrittenSize == SupposedSize);
|
||||
if (static_cast<int64_t>(SupposedSize) != (0-1)) assert(WrittenSize == SupposedSize);
|
||||
#endif // DEBUG
|
||||
result += WrittenSize;
|
||||
return result;
|
||||
|
||||
@@ -146,7 +146,7 @@ uint64 EbmlMaster::UpdateSize(bool bWithDefault, bool bForceRender)
|
||||
(ElementList[Index])->UpdateSize(bWithDefault, bForceRender);
|
||||
uint64 SizeToAdd = (ElementList[Index])->ElementSize(bWithDefault);
|
||||
#if defined(_DEBUG) || defined(DEBUG)
|
||||
if (SizeToAdd == (0-1))
|
||||
if (static_cast<int64_t>(SizeToAdd) == (0-1))
|
||||
return (0-1);
|
||||
#endif // DEBUG
|
||||
SetSize_(GetSize() + SizeToAdd);
|
||||
|
||||
Reference in New Issue
Block a user