From 9e770cc040373683e7709753b0c4a459c040eb0f Mon Sep 17 00:00:00 2001 From: yvt Date: Sat, 20 Jul 2019 13:25:35 +0900 Subject: [PATCH] Update the rules for `RefCountedObject` --- Sources/Core/RefCountedObject.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Sources/Core/RefCountedObject.h b/Sources/Core/RefCountedObject.h index 4c359ffb..0ff3d0e3 100644 --- a/Sources/Core/RefCountedObject.h +++ b/Sources/Core/RefCountedObject.h @@ -53,15 +53,8 @@ namespace spades { * if it is apparent that they store the object as `Handle`. * - Methods return `T` via a return type `Handle`. * - * # AngelScript interop - * - * - A return type `Handle` translates to an AngelScript type signature - * `T@`. - * - Methods must not return `T&` or `stmp::optional`. - * - A parameter type `stmp::optional` translates to an AngelScript - * type signature `T@+`. - * - Methods must not have a parameter of type `T&` because AngelScript - * does not have a non-nullable object handle. + * Note that `stmp::optional` nor `Handle` can be passed to/from AngelScript + * safely. */ class RefCountedObject { std::atomic refCount;