From 2ebd196985e4f9d5e9f05ba59d9e20efba43a27f Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Mon, 21 Nov 2022 13:36:40 -0800 Subject: [PATCH] Add explicit defaulted copy ctor to `Values` Summary: `Values` is a wrapper to story an array of YGValue's as CompactValues. From https://github.com/facebook/yoga/issues/1174 we see a warning `Wdeprecated-copy` beacuse a user-defined copy constructor is not present, but a user-defined asignment operator is (the defaulted one). This adds an explicitly defaulted copy contructor which should silence the warning I think. Changelog: [Internal] Differential Revision: D41447490 fbshipit-source-id: 1c1911b46aec941e481484e814dae43f56312f17 --- yoga/Yoga-internal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yoga/Yoga-internal.h b/yoga/Yoga-internal.h index 4e0efa60..9444bb5d 100644 --- a/yoga/Yoga-internal.h +++ b/yoga/Yoga-internal.h @@ -110,6 +110,8 @@ private: public: Values() = default; + Values(const Values& other) = default; + explicit Values(const YGValue& defaultValue) noexcept { values_.fill(defaultValue); }