Fix const correctness in utility functions.

By not taking the object reference as const we are forced to make copies of objects that are const or use const_cast. Eitherway, this is the correct way because objects are not modified.
This commit is contained in:
Sandu Liviu Catalin
2016-06-13 00:27:06 +03:00
parent 67d0360fb3
commit 85e881effa
2 changed files with 12 additions and 12 deletions
+4 -4
View File
@@ -1468,22 +1468,22 @@ Object MakeULongObj(HSQUIRRELVM vm, Uint64 val);
/* ------------------------------------------------------------------------------------------------
* Retrieve a signed 64 bit integer from an signed long integer object.
*/
Int64 FetchSLongObjVal(Object & val);
Int64 FetchSLongObjVal(const Object & val);
/* ------------------------------------------------------------------------------------------------
* Retrieve a unsigned 64 bit integer from an unsigned long integer object.
*/
Uint64 FetchULongObjVal(Object & val);
Uint64 FetchULongObjVal(const Object & val);
/* ------------------------------------------------------------------------------------------------
* Retrieve a signed 64 bit integer from an signed long integer object.
*/
Int64 FetchSLongObjVal(HSQUIRRELVM vm, Object & val);
Int64 FetchSLongObjVal(HSQUIRRELVM vm, const Object & val);
/* ------------------------------------------------------------------------------------------------
* Retrieve a unsigned 64 bit integer from an unsigned long integer object.
*/
Uint64 FetchULongObjVal(HSQUIRRELVM vm, Object & val);
Uint64 FetchULongObjVal(HSQUIRRELVM vm, const Object & val);
/* ------------------------------------------------------------------------------------------------
* Attempt to pop the value at the specified index on the stack as a native integer.