From 926ab6ca26e8198d57bd83bea8bf1dc85aea536d Mon Sep 17 00:00:00 2001 From: David Vacca Date: Sun, 27 Feb 2022 22:23:48 -0800 Subject: [PATCH] Mark TextLayoutManager as not copyable / not movable Summary: TextLayoutManger should be not copyable / not movable changelog: [internal] internal Reviewed By: javache Differential Revision: D34246013 fbshipit-source-id: dc20db2ad9e2709ddca5bef5218356bd2b292c2d --- .../renderer/textlayoutmanager/TextLayoutManager.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.h b/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.h index 396cd5d0e1..ce47d36dca 100644 --- a/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.h +++ b/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.h @@ -36,6 +36,18 @@ class TextLayoutManager { : kSimpleThreadSafeCacheSizeCap) {} ~TextLayoutManager(); + /* + * Not copyable. + */ + TextLayoutManager(TextLayoutManager const &) = delete; + TextLayoutManager &operator=(TextLayoutManager const &) = delete; + + /* + * Not movable. + */ + TextLayoutManager(TextLayoutManager &&) = delete; + TextLayoutManager &operator=(TextLayoutManager &&) = delete; + /* * Measures `attributedString` using native text rendering infrastructure. */