From 16690220ed6e68f2e9674a09b5008f38c5e6ed8d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 15 Oct 2018 08:48:36 +0200 Subject: loplugin:singlevalfields tighten up the handling of binary operators Change-Id: I262ec57bf7142fa094d240738150a94d83fd15ee Reviewed-on: https://gerrit.libreoffice.org/61777 Tested-by: Jenkins Reviewed-by: Noel Grandin --- ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx | 10 ++++------ ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'ucb') diff --git a/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx b/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx index 67939f3b4126..47aad2a694a6 100644 --- a/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx @@ -44,6 +44,7 @@ using namespace com::sun::star; // DAVAuthListener_Impl Implementation. +static constexpr sal_uInt32 g_nRedirectLimit = 5; // virtual int DAVAuthListener_Impl::authenticate( @@ -131,8 +132,7 @@ DAVResourceAccess::DAVResourceAccess( const OUString & rURL ) : m_aURL( rURL ), m_xSessionFactory( rSessionFactory ), - m_xContext( rxContext ), - m_nRedirectLimit( 5 ) + m_xContext( rxContext ) { } @@ -144,8 +144,7 @@ DAVResourceAccess::DAVResourceAccess( const DAVResourceAccess & rOther ) m_xSession( rOther.m_xSession ), m_xSessionFactory( rOther.m_xSessionFactory ), m_xContext( rOther.m_xContext ), - m_aRedirectURIs( rOther.m_aRedirectURIs ), - m_nRedirectLimit( rOther.m_nRedirectLimit ) + m_aRedirectURIs( rOther.m_aRedirectURIs ) { } @@ -160,7 +159,6 @@ DAVResourceAccess & DAVResourceAccess::operator=( m_xSessionFactory = rOther.m_xSessionFactory; m_xContext = rOther.m_xContext; m_aRedirectURIs = rOther.m_aRedirectURIs; - m_nRedirectLimit = rOther.m_nRedirectLimit; return *this; } @@ -1126,7 +1124,7 @@ bool DAVResourceAccess::detectRedirectCycle( // A pratical limit may be 5, due to earlier specifications: // // it can be raised keeping in mind the added net activity. - if( static_cast< size_t >( m_nRedirectLimit ) <= m_aRedirectURIs.size() ) + if( static_cast< size_t >( g_nRedirectLimit ) <= m_aRedirectURIs.size() ) return true; // try to detect a cyclical redirection diff --git a/ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx b/ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx index be1191b0974d..09d0a88b7be0 100644 --- a/ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx +++ b/ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx @@ -62,7 +62,6 @@ class DAVResourceAccess rtl::Reference< DAVSessionFactory > m_xSessionFactory; css::uno::Reference< css::uno::XComponentContext > m_xContext; std::vector< NeonUri > m_aRedirectURIs; - sal_uInt32 m_nRedirectLimit; public: DAVResourceAccess( const css::uno::Reference< css::uno::XComponentContext > & rxContext, -- cgit