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:
Steve Lhomme 2010-03-15 15:55:14 +00:00
parent 05037aebad
commit 56aecb45f7
8 changed files with 16 additions and 16 deletions

View File

@ -150,11 +150,11 @@ class EBML_DLL_API EbmlSemanticContext {
*/
class EBML_DLL_API EbmlElement {
public:
EbmlElement(const uint64 aDefaultSize, bool bValueSet = false);
EbmlElement(uint64 aDefaultSize, bool bValueSet = false);
virtual ~EbmlElement() {assert(!bLocked);}
/// 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;}
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
*/
virtual void SetDefaultSize(const uint64 aDefaultSize) {DefaultSize = aDefaultSize;}
virtual void SetDefaultSize(uint64 aDefaultSize) {DefaultSize = aDefaultSize;}
bool ValueIsSet() const {return bValueIsSet;}

View File

@ -89,13 +89,13 @@ class EBML_DLL_API EbmlMaster : public EbmlElement {
/*!
\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;
/*!
\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 *AddNewElt(const EbmlCallbacks & Callbacks);

View File

@ -52,10 +52,10 @@ const int DEFAULT_INT_SIZE = 1; ///< optimal size stored
class EBML_DLL_API EbmlSInteger : public EbmlElement {
public:
EbmlSInteger();
EbmlSInteger(const int64 DefaultValue);
EbmlSInteger(int64 DefaultValue);
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)

View File

@ -52,15 +52,15 @@ const int DEFAULT_UINT_SIZE = 0; ///< optimal size stored
class EBML_DLL_API EbmlUInteger : public EbmlElement {
public:
EbmlUInteger();
EbmlUInteger(const uint64 DefaultValue);
EbmlUInteger(uint64 DefaultValue);
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)
*/
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);}
uint32 RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact = false);

View File

@ -201,7 +201,7 @@ int64 ReadCodedSizeSignedValue(const binary * InBuffer, uint32 & BufferSize, uin
return Result;
}
EbmlElement::EbmlElement(const uint64 aDefaultSize, bool bValueSet)
EbmlElement::EbmlElement(uint64 aDefaultSize, bool bValueSet)
:DefaultSize(aDefaultSize)
,SizeLength(0) ///< write optimal size by default
,bSizeIsFinite(true)

View File

@ -44,7 +44,7 @@
START_LIBEBML_NAMESPACE
EbmlMaster::EbmlMaster(const EbmlSemanticContext & aContext, const bool bSizeIsknown)
EbmlMaster::EbmlMaster(const EbmlSemanticContext & aContext, bool bSizeIsknown)
:EbmlElement(0), Context(aContext), bChecksumUsed(bChecksumUsedByDefault)
{
bSizeIsFinite = bSizeIsknown;
@ -273,7 +273,7 @@ EbmlElement *EbmlMaster::FindElt(const EbmlCallbacks & Callbacks) const
return NULL;
}
EbmlElement *EbmlMaster::FindFirstElt(const EbmlCallbacks & Callbacks, const bool bCreateIfNull)
EbmlElement *EbmlMaster::FindFirstElt(const EbmlCallbacks & Callbacks, bool bCreateIfNull)
{
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 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;

View File

@ -42,7 +42,7 @@ EbmlSInteger::EbmlSInteger()
:EbmlElement(DEFAULT_INT_SIZE, false)
{}
EbmlSInteger::EbmlSInteger(const int64 aDefaultValue)
EbmlSInteger::EbmlSInteger(int64 aDefaultValue)
:EbmlElement(DEFAULT_INT_SIZE, true), Value(aDefaultValue)
{
DefaultIsSet = true;

View File

@ -44,7 +44,7 @@ EbmlUInteger::EbmlUInteger()
:EbmlElement(DEFAULT_UINT_SIZE, false)
{}
EbmlUInteger::EbmlUInteger(const uint64 aDefaultValue)
EbmlUInteger::EbmlUInteger(uint64 aDefaultValue)
:EbmlElement(DEFAULT_UINT_SIZE, true), Value(aDefaultValue), DefaultValue(aDefaultValue)
{
DefaultIsSet = true;