include/comphelper/propertyvalue.hxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 6f725426f75a2876b348fc2c38cb6ed30f45d565
Author:     Mike Kaganski <[email protected]>
AuthorDate: Sun Oct 17 08:29:54 2021 +0200
Commit:     Mike Kaganski <[email protected]>
CommitDate: Sun Oct 17 14:36:14 2021 +0200

    Simplify comphelper::makePropertyValue
    
    Avoid default-constructing members that get immediately re-defined.
    
    Change-Id: Ib863745577983582c80e1b172060ba20ce6135a8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123638
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/include/comphelper/propertyvalue.hxx 
b/include/comphelper/propertyvalue.hxx
index 85f3d67385c6..ac4f6886039e 100644
--- a/include/comphelper/propertyvalue.hxx
+++ b/include/comphelper/propertyvalue.hxx
@@ -27,10 +27,8 @@ namespace comphelper
  */
 template <typename T> css::beans::PropertyValue makePropertyValue(const 
OUString& rName, T&& rValue)
 {
-    css::beans::PropertyValue aValue;
-    aValue.Name = rName;
-    aValue.Value = css::uno::toAny(std::forward<T>(rValue));
-    return aValue;
+    return { rName, 0, css::uno::toAny(std::forward<T>(rValue)),
+             css::beans::PropertyState_DIRECT_VALUE };
 }
 }
 

Reply via email to