MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ScriptObjectRef

Method ScriptObjectRef

src/script/api/script_object.hpp:445–448  ·  view source on GitHub ↗

* Create the reference counter for the given ScriptObject instance. * @param data The underlying object. */

Source from the content-addressed store, hash-verified

443 * @param data The underlying object.
444 */
445 ScriptObjectRef(T *data) : data(data)
446 {
447 if (this->data != nullptr) this->data->AddRef();
448 }
449
450 /* No copy constructor. */
451 ScriptObjectRef(const ScriptObjectRef<T> &ref) = delete;

Callers

nothing calls this directly

Calls 1

AddRefMethod · 0.45

Tested by

no test coverage detected