mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Rename SQF/dayz_code/util/Reference.hpp to Server Files/Archive/dayz_code/util/Reference.hpp
This commit is contained in:
19
Server Files/Archive/dayz_code/util/Reference.hpp
Normal file
19
Server Files/Archive/dayz_code/util/Reference.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
/* Provides means for passing objects by reference.
|
||||
Reference cannot point to itself or create a loop of references.
|
||||
|
||||
Author: Foxy
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE_GUARD_REFERENCE
|
||||
#define _INCLUDE_GUARD_REFERENCE
|
||||
|
||||
//Initializes a new reference pointing to the specified object.
|
||||
#define Ref_New(val) [val]
|
||||
|
||||
//Retrieves the object pointed to by the reference.
|
||||
#define Ref_Get(ref) ((ref) select 0)
|
||||
|
||||
//Sets the reference to point to the specified object.
|
||||
#define Ref_Set(ref, val) ((ref) set [0, val])
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user