summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-01-27 15:42:54 +0600
committerMike Kaganski <mike.kaganski@collabora.com>2024-01-27 12:43:48 +0100
commit0fa827dbb2147d1d3850b2181eb6ab6a02a04500 (patch)
tree721d02c64c26365e605a2348fd1ff744c4dd8d29 /cppuhelper
parentdb227dc7d032d642983c313ab74c34a301464c2a (diff)
Drop std::as_const from css::uno::Sequence iterations
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/propertysetmixin.cxx4
-rw-r--r--cppuhelper/source/servicemanager.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx
index 50a8be1f8436..c3c1ad0a66c8 100644
--- a/cppuhelper/source/propertysetmixin.cxx
+++ b/cppuhelper/source/propertysetmixin.cxx
@@ -176,7 +176,7 @@ void Data::initProperties(
//XXX Special interpretation of getter/setter exceptions only
// works if the specified exceptions are of the exact type, not
// of a supertype:
- for (const auto & ex : std::as_const(excs)) {
+ for (const auto & ex : excs) {
if ( ex->getName() == "com.sun.star.beans.UnknownPropertyException" )
{
bGetUnknown = true;
@@ -184,7 +184,7 @@ void Data::initProperties(
}
}
excs = attr->getSetExceptions();
- for (const auto & ex : std::as_const(excs)) {
+ for (const auto & ex : excs) {
if ( ex->getName() == "com.sun.star.beans.UnknownPropertyException" )
{
bSetUnknown = true;
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index 7eccd274e7f4..cd981b8d1a87 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -1053,7 +1053,7 @@ void cppuhelper::ServiceManager::insert(css::uno::Any const & aElement)
if (aElement >>= args) {
std::vector< OUString > uris;
css::uno::Reference< css::uno::XComponentContext > alienContext;
- for (const auto & arg : std::as_const(args)) {
+ for (const auto & arg : args) {
if (arg.Name == "uri") {
OUString uri;
if (!(arg.Value >>= uri)) {
@@ -1097,7 +1097,7 @@ void cppuhelper::ServiceManager::remove(css::uno::Any const & aElement)
css::uno::Sequence< css::beans::NamedValue > args;
if (aElement >>= args) {
std::vector< OUString > uris;
- for (const auto & i : std::as_const(args)) {
+ for (const auto & i : args) {
if (i.Name != "uri") {
throw css::lang::IllegalArgumentException(
"Bad argument " + i.Name,