From 7b3190eda387bcd897095205732f6752dedf01ef Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 28 Nov 2019 17:24:25 +0100 Subject: boost::optional: replace uses of get_value_or with value_or ...in preparation for wholesale replacement of boost::optional with o3tl::optional, which will be an alias for either std::optional or boost::optional, and std::optional only has value_or. boost::optional::value_or was added with "Added function value_or()", which according to git-describe first appeared in tag boost-1.56.0. We appear to have no strict Boost baseline (the closest we get is with > [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)] in configure.ac), and at least CentOS 7 TDF machine tb76 only has boost-devel-1.53.0-27.el7.x86_64. However, any environment using Xcode < 10 that needs to make o3tl::optional fall back to boost::optional should use --without-system-boost, and external/boost is currently at 1.69.0, so should be safe. ATTENTION: In isolation, this commit will break in any environment that uses Boost older than 1.56.0. It requires the following commit introducing o3tl::optional. (But doing these changes in individual commits was deemed more valuable than supporting a hypothetical future git-bisect against an old Boost.) Change-Id: Ib31affa3eebf0d0029d8620dc6abb7a60f6c7629 Reviewed-on: https://gerrit.libreoffice.org/84127 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- xmlsecurity/source/xmlsec/nss/nssinitializer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index 4288e1ed426d..e268e6e25d63 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx @@ -250,7 +250,7 @@ OString getMozillaCurrentProfile( const css::uno::Reference< css::uno::XComponen try { OUString sUserSetCertPath = - officecfg::Office::Common::Security::Scripting::CertDir::get().get_value_or(OUString()); + officecfg::Office::Common::Security::Scripting::CertDir::get().value_or(OUString()); if (!sUserSetCertPath.isEmpty()) { -- cgit v1.2.3