summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-15 08:48:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-17 08:25:06 +0200
commit16690220ed6e68f2e9674a09b5008f38c5e6ed8d (patch)
tree2f830b7ac23f136585e7dc4adf5d456f4995cc99 /ucb
parent86d70dc840b88ed827d6d8febaf512264009951d (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx10
-rw-r--r--ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx1
2 files changed, 4 insertions, 7 deletions
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:
// <https://tools.ietf.org/html/rfc2068#section-10.3>
// 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,