summaryrefslogtreecommitdiff
path: root/ucb/source/ucp
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-12-07 13:24:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-12-07 12:41:15 +0000
commit3c140c01748a30da1f83254b28ca7ab7a620197e (patch)
treef3aca4b46628c6e309f59db339a4b8dd67f5ad82 /ucb/source/ucp
parentcb26710b6b40df59f34dd6a65988cd55e32153b0 (diff)
loplugin:singlevalfields
Change-Id: Ic7dd2cb433add02ecc72eee0c85dd7f0efe1d47b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143771 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb/source/ucp')
-rw-r--r--ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx8
-rw-r--r--ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx1
2 files changed, 3 insertions, 6 deletions
diff --git a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
index 5e1f00474aad..fa324b0493e9 100644
--- a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
@@ -121,6 +121,7 @@ int DAVAuthListener_Impl::authenticate(
// DAVResourceAccess Implementation.
+constexpr size_t g_nRedirectLimit = 5;
DAVResourceAccess::DAVResourceAccess(
uno::Reference< uno::XComponentContext > xContext,
@@ -129,7 +130,6 @@ DAVResourceAccess::DAVResourceAccess(
: m_aURL(std::move( aURL )),
m_xSessionFactory(std::move( xSessionFactory )),
m_xContext(std::move( xContext ))
-, m_nRedirectLimit( 5 )
{
}
@@ -141,8 +141,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 )
{
}
@@ -157,7 +156,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;
}
@@ -1095,7 +1093,7 @@ bool DAVResourceAccess::detectRedirectCycle(
// A practical 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( g_nRedirectLimit <= m_aRedirectURIs.size() )
return true;
// try to detect a cyclical redirection
diff --git a/ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx b/ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx
index ae2f2ad64dee..5d5ea07bdd01 100644
--- a/ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx
+++ b/ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx
@@ -52,7 +52,6 @@ class DAVResourceAccess
rtl::Reference< DAVSessionFactory > m_xSessionFactory;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
std::vector<CurlUri> m_aRedirectURIs;
- sal_uInt32 m_nRedirectLimit;
public:
DAVResourceAccess() = default;