From 8e5fc3668cd968f386c62f20d32535d85a402b39 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 17 Apr 2020 17:16:31 -0400 Subject: [PATCH] CToken: Amend incorrect return value of TToken's operator= This should be returning by reference, not the pointer of this. --- Runtime/CToken.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/CToken.hpp b/Runtime/CToken.hpp index 1fec4bbd5..fde3a4435 100644 --- a/Runtime/CToken.hpp +++ b/Runtime/CToken.hpp @@ -107,7 +107,7 @@ public: TToken(std::unique_ptr&& obj) : CToken(GetIObjObjectFor(std::move(obj))) {} TToken& operator=(std::unique_ptr&& obj) { *this = CToken(GetIObjObjectFor(std::move(obj))); - return this; + return *this; } virtual void Unlock() { CToken::Unlock(); } virtual void Lock() { CToken::Lock(); }