mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-12 07:34:50 +00:00
Mark PType's GetValueInt method as const
This commit is contained in:
parent
3ea0d1b444
commit
2ec3cbddb9
2 changed files with 7 additions and 6 deletions
|
@ -223,7 +223,7 @@ void PType::SetValue(void *addr, int val)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
int PType::GetValueInt(void *addr)
|
int PType::GetValueInt(void *addr) const
|
||||||
{
|
{
|
||||||
assert(0 && "Cannot get value for this type");
|
assert(0 && "Cannot get value for this type");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -420,7 +420,7 @@ void PInt::SetValue(void *addr, int val)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
int PInt::GetValueInt(void *addr)
|
int PInt::GetValueInt(void *addr) const
|
||||||
{
|
{
|
||||||
assert(((intptr_t)addr & (Align - 1)) == 0 && "unaligned address");
|
assert(((intptr_t)addr & (Align - 1)) == 0 && "unaligned address");
|
||||||
if (Size == 4)
|
if (Size == 4)
|
||||||
|
@ -498,7 +498,7 @@ void PFloat::SetValue(void *addr, int val)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
int PFloat::GetValueInt(void *addr)
|
int PFloat::GetValueInt(void *addr) const
|
||||||
{
|
{
|
||||||
assert(((intptr_t)addr & (Align - 1)) == 0 && "unaligned address");
|
assert(((intptr_t)addr & (Align - 1)) == 0 && "unaligned address");
|
||||||
if (Size == 4)
|
if (Size == 4)
|
||||||
|
|
|
@ -172,7 +172,8 @@ public:
|
||||||
virtual void SetValue(void *addr, int val);
|
virtual void SetValue(void *addr, int val);
|
||||||
|
|
||||||
// Gets the value of a variable of this type at (addr)
|
// Gets the value of a variable of this type at (addr)
|
||||||
virtual int GetValueInt(void *addr);
|
virtual int GetValueInt(void *addr) const;
|
||||||
|
|
||||||
|
|
||||||
// Returns true if this type matches the two identifiers. Referring to the
|
// Returns true if this type matches the two identifiers. Referring to the
|
||||||
// above table, any type is identified by at most two characteristics. Each
|
// above table, any type is identified by at most two characteristics. Each
|
||||||
|
@ -227,7 +228,7 @@ public:
|
||||||
PInt(unsigned int size, bool unsign);
|
PInt(unsigned int size, bool unsign);
|
||||||
|
|
||||||
virtual void SetValue(void *addr, int val);
|
virtual void SetValue(void *addr, int val);
|
||||||
virtual int GetValueInt(void *addr);
|
virtual int GetValueInt(void *addr) const;
|
||||||
|
|
||||||
bool Unsigned;
|
bool Unsigned;
|
||||||
protected:
|
protected:
|
||||||
|
@ -241,7 +242,7 @@ public:
|
||||||
PFloat(unsigned int size);
|
PFloat(unsigned int size);
|
||||||
|
|
||||||
virtual void SetValue(void *addr, int val);
|
virtual void SetValue(void *addr, int val);
|
||||||
virtual int GetValueInt(void *addr);
|
virtual int GetValueInt(void *addr) const;
|
||||||
protected:
|
protected:
|
||||||
PFloat();
|
PFloat();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue