integer and boolean variables don't need a const when used as parameters
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@6 a6f86f6d-0131-4f8e-9e7b-e335508773d5
This commit is contained in:
parent
05037aebad
commit
56aecb45f7
@ -150,11 +150,11 @@ class EBML_DLL_API EbmlSemanticContext {
|
|||||||
*/
|
*/
|
||||||
class EBML_DLL_API EbmlElement {
|
class EBML_DLL_API EbmlElement {
|
||||||
public:
|
public:
|
||||||
EbmlElement(const uint64 aDefaultSize, bool bValueSet = false);
|
EbmlElement(uint64 aDefaultSize, bool bValueSet = false);
|
||||||
virtual ~EbmlElement() {assert(!bLocked);}
|
virtual ~EbmlElement() {assert(!bLocked);}
|
||||||
|
|
||||||
/// Set the minimum length that will be used to write the element size (-1 = optimal)
|
/// Set the minimum length that will be used to write the element size (-1 = optimal)
|
||||||
void SetSizeLength(const int NewSizeLength) {SizeLength = NewSizeLength;}
|
void SetSizeLength(int NewSizeLength) {SizeLength = NewSizeLength;}
|
||||||
int GetSizeLength() const {return SizeLength;}
|
int GetSizeLength() const {return SizeLength;}
|
||||||
|
|
||||||
static EbmlElement * FindNextElement(IOCallback & DataStream, const EbmlSemanticContext & Context, int & UpperLevel, uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel = 1);
|
static EbmlElement * FindNextElement(IOCallback & DataStream, const EbmlSemanticContext & Context, int & UpperLevel, uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel = 1);
|
||||||
@ -236,7 +236,7 @@ class EBML_DLL_API EbmlElement {
|
|||||||
/*!
|
/*!
|
||||||
\brief set the default size of an element
|
\brief set the default size of an element
|
||||||
*/
|
*/
|
||||||
virtual void SetDefaultSize(const uint64 aDefaultSize) {DefaultSize = aDefaultSize;}
|
virtual void SetDefaultSize(uint64 aDefaultSize) {DefaultSize = aDefaultSize;}
|
||||||
|
|
||||||
bool ValueIsSet() const {return bValueIsSet;}
|
bool ValueIsSet() const {return bValueIsSet;}
|
||||||
|
|
||||||
|
@ -89,13 +89,13 @@ class EBML_DLL_API EbmlMaster : public EbmlElement {
|
|||||||
/*!
|
/*!
|
||||||
\brief find the first element corresponding to the ID of the element
|
\brief find the first element corresponding to the ID of the element
|
||||||
*/
|
*/
|
||||||
EbmlElement *FindFirstElt(const EbmlCallbacks & Callbacks, const bool bCreateIfNull);
|
EbmlElement *FindFirstElt(const EbmlCallbacks & Callbacks, bool bCreateIfNull);
|
||||||
EbmlElement *FindFirstElt(const EbmlCallbacks & Callbacks) const;
|
EbmlElement *FindFirstElt(const EbmlCallbacks & Callbacks) const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief find the element of the same type of PasElt following in the list of elements
|
\brief find the element of the same type of PasElt following in the list of elements
|
||||||
*/
|
*/
|
||||||
EbmlElement *FindNextElt(const EbmlElement & PastElt, const bool bCreateIfNull);
|
EbmlElement *FindNextElt(const EbmlElement & PastElt, bool bCreateIfNull);
|
||||||
EbmlElement *FindNextElt(const EbmlElement & PastElt) const;
|
EbmlElement *FindNextElt(const EbmlElement & PastElt) const;
|
||||||
EbmlElement *AddNewElt(const EbmlCallbacks & Callbacks);
|
EbmlElement *AddNewElt(const EbmlCallbacks & Callbacks);
|
||||||
|
|
||||||
|
@ -52,10 +52,10 @@ const int DEFAULT_INT_SIZE = 1; ///< optimal size stored
|
|||||||
class EBML_DLL_API EbmlSInteger : public EbmlElement {
|
class EBML_DLL_API EbmlSInteger : public EbmlElement {
|
||||||
public:
|
public:
|
||||||
EbmlSInteger();
|
EbmlSInteger();
|
||||||
EbmlSInteger(const int64 DefaultValue);
|
EbmlSInteger(int64 DefaultValue);
|
||||||
EbmlSInteger(const EbmlSInteger & ElementToClone);
|
EbmlSInteger(const EbmlSInteger & ElementToClone);
|
||||||
|
|
||||||
EbmlSInteger & operator=(const int64 NewValue) {Value = NewValue; bValueIsSet = true; return *this;}
|
EbmlSInteger & operator=(int64 NewValue) {Value = NewValue; bValueIsSet = true; return *this;}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Set the default size of the integer (usually 1,2,4 or 8)
|
Set the default size of the integer (usually 1,2,4 or 8)
|
||||||
|
@ -52,15 +52,15 @@ const int DEFAULT_UINT_SIZE = 0; ///< optimal size stored
|
|||||||
class EBML_DLL_API EbmlUInteger : public EbmlElement {
|
class EBML_DLL_API EbmlUInteger : public EbmlElement {
|
||||||
public:
|
public:
|
||||||
EbmlUInteger();
|
EbmlUInteger();
|
||||||
EbmlUInteger(const uint64 DefaultValue);
|
EbmlUInteger(uint64 DefaultValue);
|
||||||
EbmlUInteger(const EbmlUInteger & ElementToClone);
|
EbmlUInteger(const EbmlUInteger & ElementToClone);
|
||||||
|
|
||||||
EbmlUInteger & operator=(const uint64 NewValue) {Value = NewValue; bValueIsSet = true; return *this;}
|
EbmlUInteger & operator=(uint64 NewValue) {Value = NewValue; bValueIsSet = true; return *this;}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Set the default size of the integer (usually 1,2,4 or 8)
|
Set the default size of the integer (usually 1,2,4 or 8)
|
||||||
*/
|
*/
|
||||||
void SetDefaultSize(const int nDefaultSize = DEFAULT_UINT_SIZE) {Size = nDefaultSize;}
|
void SetDefaultSize(int nDefaultSize = DEFAULT_UINT_SIZE) {Size = nDefaultSize;}
|
||||||
|
|
||||||
bool ValidateSize() const {return (Size <= 8);}
|
bool ValidateSize() const {return (Size <= 8);}
|
||||||
uint32 RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact = false);
|
uint32 RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact = false);
|
||||||
|
@ -201,7 +201,7 @@ int64 ReadCodedSizeSignedValue(const binary * InBuffer, uint32 & BufferSize, uin
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
EbmlElement::EbmlElement(const uint64 aDefaultSize, bool bValueSet)
|
EbmlElement::EbmlElement(uint64 aDefaultSize, bool bValueSet)
|
||||||
:DefaultSize(aDefaultSize)
|
:DefaultSize(aDefaultSize)
|
||||||
,SizeLength(0) ///< write optimal size by default
|
,SizeLength(0) ///< write optimal size by default
|
||||||
,bSizeIsFinite(true)
|
,bSizeIsFinite(true)
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
START_LIBEBML_NAMESPACE
|
START_LIBEBML_NAMESPACE
|
||||||
|
|
||||||
EbmlMaster::EbmlMaster(const EbmlSemanticContext & aContext, const bool bSizeIsknown)
|
EbmlMaster::EbmlMaster(const EbmlSemanticContext & aContext, bool bSizeIsknown)
|
||||||
:EbmlElement(0), Context(aContext), bChecksumUsed(bChecksumUsedByDefault)
|
:EbmlElement(0), Context(aContext), bChecksumUsed(bChecksumUsedByDefault)
|
||||||
{
|
{
|
||||||
bSizeIsFinite = bSizeIsknown;
|
bSizeIsFinite = bSizeIsknown;
|
||||||
@ -273,7 +273,7 @@ EbmlElement *EbmlMaster::FindElt(const EbmlCallbacks & Callbacks) const
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
EbmlElement *EbmlMaster::FindFirstElt(const EbmlCallbacks & Callbacks, const bool bCreateIfNull)
|
EbmlElement *EbmlMaster::FindFirstElt(const EbmlCallbacks & Callbacks, bool bCreateIfNull)
|
||||||
{
|
{
|
||||||
size_t Index;
|
size_t Index;
|
||||||
|
|
||||||
@ -314,7 +314,7 @@ EbmlElement *EbmlMaster::FindFirstElt(const EbmlCallbacks & Callbacks) const
|
|||||||
\todo only return elements that are from the same type !
|
\todo only return elements that are from the same type !
|
||||||
\todo the element might be the unique in the context !
|
\todo the element might be the unique in the context !
|
||||||
*/
|
*/
|
||||||
EbmlElement *EbmlMaster::FindNextElt(const EbmlElement & PastElt, const bool bCreateIfNull)
|
EbmlElement *EbmlMaster::FindNextElt(const EbmlElement & PastElt, bool bCreateIfNull)
|
||||||
{
|
{
|
||||||
size_t Index;
|
size_t Index;
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ EbmlSInteger::EbmlSInteger()
|
|||||||
:EbmlElement(DEFAULT_INT_SIZE, false)
|
:EbmlElement(DEFAULT_INT_SIZE, false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
EbmlSInteger::EbmlSInteger(const int64 aDefaultValue)
|
EbmlSInteger::EbmlSInteger(int64 aDefaultValue)
|
||||||
:EbmlElement(DEFAULT_INT_SIZE, true), Value(aDefaultValue)
|
:EbmlElement(DEFAULT_INT_SIZE, true), Value(aDefaultValue)
|
||||||
{
|
{
|
||||||
DefaultIsSet = true;
|
DefaultIsSet = true;
|
||||||
|
@ -44,7 +44,7 @@ EbmlUInteger::EbmlUInteger()
|
|||||||
:EbmlElement(DEFAULT_UINT_SIZE, false)
|
:EbmlElement(DEFAULT_UINT_SIZE, false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
EbmlUInteger::EbmlUInteger(const uint64 aDefaultValue)
|
EbmlUInteger::EbmlUInteger(uint64 aDefaultValue)
|
||||||
:EbmlElement(DEFAULT_UINT_SIZE, true), Value(aDefaultValue), DefaultValue(aDefaultValue)
|
:EbmlElement(DEFAULT_UINT_SIZE, true), Value(aDefaultValue), DefaultValue(aDefaultValue)
|
||||||
{
|
{
|
||||||
DefaultIsSet = true;
|
DefaultIsSet = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user