[Libreoffice-commits] core.git: compilerplugins/clang ucb/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 10 19:59:28 UTC 2021
compilerplugins/clang/makeshared.cxx | 5 -----
ucb/source/ucp/cmis/cmis_content.cxx | 14 ++++++++------
ucb/source/ucp/cmis/cmis_repo_content.cxx | 16 ++++++++++------
3 files changed, 18 insertions(+), 17 deletions(-)
New commits:
commit 7bae79e234b12c56ecb11e10cb6318be873be846
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Aug 10 20:51:45 2021 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Aug 10 21:58:46 2021 +0200
Use boost::make_shared
Change-Id: I2c842d6198d79dcc3f5c85ab65c8f57357aa2a79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120289
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/compilerplugins/clang/makeshared.cxx b/compilerplugins/clang/makeshared.cxx
index 9b512371d635..816d1269fac3 100644
--- a/compilerplugins/clang/makeshared.cxx
+++ b/compilerplugins/clang/makeshared.cxx
@@ -37,11 +37,6 @@ public:
virtual bool preRun() override
{
StringRef fn(handler.getMainFileName());
- // uses boost::shared_ptr and we trigger because we're not looking specifically for std::shared_ptr
- if (loplugin::isSamePathname(fn, SRCDIR "/ucb/source/ucp/cmis/cmis_repo_content.cxx"))
- return false;
- if (loplugin::isSamePathname(fn, SRCDIR "/ucb/source/ucp/cmis/cmis_content.cxx"))
- return false;
// TODO something weird with protected base classes going on here
if (loplugin::isSamePathname(fn, SRCDIR "/sc/source/filter/excel/xeextlst.cxx"))
return false;
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index b5fb4ac3bda3..f4ad780444bc 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -10,6 +10,8 @@
#include <cstdio>
#include <string_view>
+#include <boost/make_shared.hpp>
+
#include <com/sun/star/beans/IllegalTypeException.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -371,25 +373,25 @@ namespace cmis
// reset the skip, so user gets a chance to cancel
bSkipInitialPWAuth = false;
libcmis::SessionFactory::setOAuth2AuthCodeProvider(AuthProvider::copyWebAuthCodeFallback);
- oauth2Data.reset( new libcmis::OAuth2Data(
+ oauth2Data = boost::make_shared<libcmis::OAuth2Data>(
GDRIVE_AUTH_URL, GDRIVE_TOKEN_URL,
GDRIVE_SCOPE, GDRIVE_REDIRECT_URI,
- GDRIVE_CLIENT_ID, GDRIVE_CLIENT_SECRET ) );
+ GDRIVE_CLIENT_ID, GDRIVE_CLIENT_SECRET );
}
if ( m_aURL.getBindingUrl().startsWith( ALFRESCO_CLOUD_BASE_URL ) )
- oauth2Data.reset( new libcmis::OAuth2Data(
+ oauth2Data = boost::make_shared<libcmis::OAuth2Data>(
ALFRESCO_CLOUD_AUTH_URL, ALFRESCO_CLOUD_TOKEN_URL,
ALFRESCO_CLOUD_SCOPE, ALFRESCO_CLOUD_REDIRECT_URI,
- ALFRESCO_CLOUD_CLIENT_ID, ALFRESCO_CLOUD_CLIENT_SECRET ) );
+ ALFRESCO_CLOUD_CLIENT_ID, ALFRESCO_CLOUD_CLIENT_SECRET );
if ( m_aURL.getBindingUrl( ) == ONEDRIVE_BASE_URL )
{
// reset the skip, so user gets a chance to cancel
bSkipInitialPWAuth = false;
libcmis::SessionFactory::setOAuth2AuthCodeProvider(AuthProvider::copyWebAuthCodeFallback);
- oauth2Data.reset( new libcmis::OAuth2Data(
+ oauth2Data = boost::make_shared<libcmis::OAuth2Data>(
ONEDRIVE_AUTH_URL, ONEDRIVE_TOKEN_URL,
ONEDRIVE_SCOPE, ONEDRIVE_REDIRECT_URI,
- ONEDRIVE_CLIENT_ID, ONEDRIVE_CLIENT_SECRET ) );
+ ONEDRIVE_CLIENT_ID, ONEDRIVE_CLIENT_SECRET );
}
try
{
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index 87a3f38dc792..33ded7b33c76 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <boost/make_shared.hpp>
+
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
@@ -166,23 +170,23 @@ namespace cmis
if ( m_aURL.getBindingUrl( ) == GDRIVE_BASE_URL )
{
libcmis::SessionFactory::setOAuth2AuthCodeProvider( AuthProvider::copyWebAuthCodeFallback );
- oauth2Data.reset( new libcmis::OAuth2Data(
+ oauth2Data = boost::make_shared<libcmis::OAuth2Data>(
GDRIVE_AUTH_URL, GDRIVE_TOKEN_URL,
GDRIVE_SCOPE, GDRIVE_REDIRECT_URI,
- GDRIVE_CLIENT_ID, GDRIVE_CLIENT_SECRET ) );
+ GDRIVE_CLIENT_ID, GDRIVE_CLIENT_SECRET );
}
if ( m_aURL.getBindingUrl().startsWith( ALFRESCO_CLOUD_BASE_URL ) )
- oauth2Data.reset( new libcmis::OAuth2Data(
+ oauth2Data = boost::make_shared<libcmis::OAuth2Data>(
ALFRESCO_CLOUD_AUTH_URL, ALFRESCO_CLOUD_TOKEN_URL,
ALFRESCO_CLOUD_SCOPE, ALFRESCO_CLOUD_REDIRECT_URI,
- ALFRESCO_CLOUD_CLIENT_ID, ALFRESCO_CLOUD_CLIENT_SECRET ) );
+ ALFRESCO_CLOUD_CLIENT_ID, ALFRESCO_CLOUD_CLIENT_SECRET );
if ( m_aURL.getBindingUrl( ) == ONEDRIVE_BASE_URL )
{
libcmis::SessionFactory::setOAuth2AuthCodeProvider( AuthProvider::copyWebAuthCodeFallback );
- oauth2Data.reset( new libcmis::OAuth2Data(
+ oauth2Data = boost::make_shared<libcmis::OAuth2Data>(
ONEDRIVE_AUTH_URL, ONEDRIVE_TOKEN_URL,
ONEDRIVE_SCOPE, ONEDRIVE_REDIRECT_URI,
- ONEDRIVE_CLIENT_ID, ONEDRIVE_CLIENT_SECRET ) );
+ ONEDRIVE_CLIENT_ID, ONEDRIVE_CLIENT_SECRET );
}
std::unique_ptr<libcmis::Session> session(libcmis::SessionFactory::createSession(
More information about the Libreoffice-commits
mailing list