summaryrefslogtreecommitdiffstats
path: root/src/CompositeChat.h
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2020-11-11 22:38:51 +0100
committerGitHub <noreply@github.com>2020-11-11 22:38:51 +0100
commit14a00d0051d9c0f97105145bd2ecf7679bb015a3 (patch)
treeaf90be9dec87986e11779f16ee546de8538e3a1c /src/CompositeChat.h
parentAdd correct implementation of crops (#4802) (diff)
downloadcuberite-14a00d0051d9c0f97105145bd2ecf7679bb015a3.tar
cuberite-14a00d0051d9c0f97105145bd2ecf7679bb015a3.tar.gz
cuberite-14a00d0051d9c0f97105145bd2ecf7679bb015a3.tar.bz2
cuberite-14a00d0051d9c0f97105145bd2ecf7679bb015a3.tar.lz
cuberite-14a00d0051d9c0f97105145bd2ecf7679bb015a3.tar.xz
cuberite-14a00d0051d9c0f97105145bd2ecf7679bb015a3.tar.zst
cuberite-14a00d0051d9c0f97105145bd2ecf7679bb015a3.zip
Diffstat (limited to 'src/CompositeChat.h')
-rw-r--r--src/CompositeChat.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/CompositeChat.h b/src/CompositeChat.h
index 675837548..b52b76bc5 100644
--- a/src/CompositeChat.h
+++ b/src/CompositeChat.h
@@ -152,9 +152,8 @@ public:
} ;
-
- using cParts = std::vector<cBasePart *>;
-
+ /** the parts have to be allocated with new else the part specific parts are not saved (only the cBasePart members). */
+ using cParts = std::vector<std::unique_ptr<cBasePart>>;
/** Creates a new empty chat message.
Exported manually due to the other overload needing a manual export. */
@@ -166,6 +165,12 @@ public:
Exported manually due to ToLua++ generating extra output parameter. */
cCompositeChat(const AString & a_ParseText, eMessageType a_MessageType = mtCustom);
+ cCompositeChat(cCompositeChat && a_Other) = default;
+
+ /** Copy constructor is explicitly deleted because m_Parts is not copyable. */
+ cCompositeChat(cCompositeChat & a_Other) = delete;
+ cCompositeChat(const cCompositeChat & a_Other) = delete;
+
~cCompositeChat(); // tolua_export
// The following are exported in ManualBindings in order to support chaining - they return "self" in Lua (#755)