diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-04 19:33:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-04 22:30:38 +0200 |
commit | eae2e1d6d61e7096d3fc0220832a1d1705d70093 (patch) | |
tree | dcfa4be8a742853afe550f4ae0563556ee8926c8 /comphelper/qa | |
parent | 158bd4ae5c5fc9a3ab96c46fd20a56bc0d5b81dc (diff) |
Just use Any ctor instead of makeAny in comphelper
Change-Id: Ib3edbef27c2d25dae8bac07e0199af071131170e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133839
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'comphelper/qa')
-rw-r--r-- | comphelper/qa/unit/types_test.cxx | 12 | ||||
-rw-r--r-- | comphelper/qa/unit/variadictemplates.cxx | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/comphelper/qa/unit/types_test.cxx b/comphelper/qa/unit/types_test.cxx index a0f136a5f49f..c69b07199127 100644 --- a/comphelper/qa/unit/types_test.cxx +++ b/comphelper/qa/unit/types_test.cxx @@ -42,7 +42,7 @@ public: void TypesTest::testGetINT64() { - CPPUNIT_ASSERT_EQUAL(sal_Int64(1337), ::comphelper::getINT64(uno::makeAny(sal_Int64(1337)))); + CPPUNIT_ASSERT_EQUAL(sal_Int64(1337), ::comphelper::getINT64(uno::Any(sal_Int64(1337)))); uno::Any aValue; CPPUNIT_ASSERT_EQUAL(sal_Int64(0), ::comphelper::getINT64(aValue)); @@ -50,7 +50,7 @@ void TypesTest::testGetINT64() void TypesTest::testGetINT32() { - CPPUNIT_ASSERT_EQUAL(sal_Int32(1337), ::comphelper::getINT32(uno::makeAny(sal_Int32(1337)))); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1337), ::comphelper::getINT32(uno::Any(sal_Int32(1337)))); uno::Any aValue; CPPUNIT_ASSERT_EQUAL(sal_Int32(0), ::comphelper::getINT32(aValue)); @@ -58,7 +58,7 @@ void TypesTest::testGetINT32() void TypesTest::testGetINT16() { - CPPUNIT_ASSERT_EQUAL(sal_Int16(1337), ::comphelper::getINT16(uno::makeAny(sal_Int16(1337)))); + CPPUNIT_ASSERT_EQUAL(sal_Int16(1337), ::comphelper::getINT16(uno::Any(sal_Int16(1337)))); uno::Any aValue; CPPUNIT_ASSERT_EQUAL(sal_Int16(0), ::comphelper::getINT16(aValue)); @@ -66,7 +66,7 @@ void TypesTest::testGetINT16() void TypesTest::testGetDouble() { - CPPUNIT_ASSERT_EQUAL(1337.1337, ::comphelper::getDouble(uno::makeAny(1337.1337))); + CPPUNIT_ASSERT_EQUAL(1337.1337, ::comphelper::getDouble(uno::Any(1337.1337))); uno::Any aValue; CPPUNIT_ASSERT_EQUAL(0.0, ::comphelper::getDouble(aValue)); @@ -75,7 +75,7 @@ void TypesTest::testGetDouble() void TypesTest::testGetFloat() { CPPUNIT_ASSERT_EQUAL(static_cast<float>(1337.0), - ::comphelper::getFloat(uno::makeAny(static_cast<float>(1337.0)))); + ::comphelper::getFloat(uno::Any(static_cast<float>(1337.0)))); uno::Any aValue; CPPUNIT_ASSERT_EQUAL(static_cast<float>(0.0), ::comphelper::getFloat(aValue)); @@ -83,7 +83,7 @@ void TypesTest::testGetFloat() void TypesTest::testGetString() { - CPPUNIT_ASSERT_EQUAL(OUString("1337"), ::comphelper::getString(uno::makeAny(OUString("1337")))); + CPPUNIT_ASSERT_EQUAL(OUString("1337"), ::comphelper::getString(uno::Any(OUString("1337")))); uno::Any aValue; CPPUNIT_ASSERT_EQUAL(OUString(""), ::comphelper::getString(aValue)); diff --git a/comphelper/qa/unit/variadictemplates.cxx b/comphelper/qa/unit/variadictemplates.cxx index e729d76b24ed..6b62204f487c 100644 --- a/comphelper/qa/unit/variadictemplates.cxx +++ b/comphelper/qa/unit/variadictemplates.cxx @@ -91,22 +91,22 @@ void VariadicTemplatesTest::testUnwrapArgs() { sal_Int32 tmp2 = 42; sal_uInt32 tmp3 = 42; ::com::sun::star::uno::Any tmp6( - ::com::sun::star::uno::makeAny( tmp1 ) + tmp1 ); ::com::sun::star::uno::Any tmp7( - ::com::sun::star::uno::makeAny( tmp2 ) + tmp2 ); ::com::sun::star::uno::Any tmp8( - ::com::sun::star::uno::makeAny( tmp3 ) + tmp3 ); ::com::sun::star::uno::Any tmp9( - ::com::sun::star::uno::makeAny( OUString("Test2") ) + OUString("Test2") ); ::std::optional< ::com::sun::star::uno::Any > tmp10( - ::com::sun::star::uno::makeAny( OUString("Test3") ) + OUString("Test3") ); ::std::optional< ::com::sun::star::uno::Any > tmp11( - ::com::sun::star::uno::makeAny( tmp1 ) + tmp1 ); // test equality with the baseline and template specialization with |