summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-05 10:10:54 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-05 12:44:25 +0000
commitf07ff7ed8a23b4982ed9cd7d9e2083c9d0928384 (patch)
tree636c69f83d25d0bfe540322b24dcbe3779c6b9b7 /sal
parent931a72efbc8708fab91e849b39a84e6b7939c7de (diff)
clang-tidy modernize-loop-convert in oox to sax
Change-Id: If0d87b6679765fc6d1f9300c6972845cf3742b9c Reviewed-on: https://gerrit.libreoffice.org/24674 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/signal.cxx28
-rw-r--r--sal/rtl/hash.cxx6
2 files changed, 17 insertions, 17 deletions
diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index 1c857b6b7535..78b42eb6423c 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -208,21 +208,21 @@ bool onInitSignal()
sigfillset(&(act.sa_mask));
/* Initialize the rest of the signals */
- for (int i = 0; i < NoSignals; ++i)
+ for (SignalAction & rSignal : Signals)
{
#if defined HAVE_VALGRIND_HEADERS
- if (Signals[i].Signal == SIGUSR2 && RUNNING_ON_VALGRIND)
- Signals[i].Action = ACT_IGNORE;
+ if (rSignal.Signal == SIGUSR2 && RUNNING_ON_VALGRIND)
+ rSignal.Action = ACT_IGNORE;
#endif
/* hack: stomcatd is attaching JavaVM which does not work with an sigaction(SEGV) */
- if ((bSetSEGVHandler || Signals[i].Signal != SIGSEGV)
- && (bSetWINCHHandler || Signals[i].Signal != SIGWINCH)
- && (bSetILLHandler || Signals[i].Signal != SIGILL))
+ if ((bSetSEGVHandler || rSignal.Signal != SIGSEGV)
+ && (bSetWINCHHandler || rSignal.Signal != SIGWINCH)
+ && (bSetILLHandler || rSignal.Signal != SIGILL))
{
- if (Signals[i].Action != ACT_SYSTEM)
+ if (rSignal.Action != ACT_SYSTEM)
{
- if (Signals[i].Action == ACT_HIDE)
+ if (rSignal.Action == ACT_HIDE)
{
struct sigaction ign;
@@ -231,18 +231,18 @@ bool onInitSignal()
sigemptyset(&ign.sa_mask);
struct sigaction oact;
- if (sigaction(Signals[i].Signal, &ign, &oact) == 0)
- Signals[i].Handler = oact.sa_handler;
+ if (sigaction(rSignal.Signal, &ign, &oact) == 0)
+ rSignal.Handler = oact.sa_handler;
else
- Signals[i].Handler = SIG_DFL;
+ rSignal.Handler = SIG_DFL;
}
else
{
struct sigaction oact;
- if (sigaction(Signals[i].Signal, &act, &oact) == 0)
- Signals[i].Handler = oact.sa_handler;
+ if (sigaction(rSignal.Signal, &act, &oact) == 0)
+ rSignal.Handler = oact.sa_handler;
else
- Signals[i].Handler = SIG_DFL;
+ rSignal.Handler = SIG_DFL;
}
}
}
diff --git a/sal/rtl/hash.cxx b/sal/rtl/hash.cxx
index 9df367f25f7d..110283c3472b 100644
--- a/sal/rtl/hash.cxx
+++ b/sal/rtl/hash.cxx
@@ -58,10 +58,10 @@ getNextSize (sal_uInt32 nSize)
2097143, 4194301, 8388593, 16777213,
33554393, 67108859, 134217689 };
- for (sal_uInt32 i = 0; i < SAL_N_ELEMENTS(nPrimes); i++)
+ for (sal_uInt32 nPrime : nPrimes)
{
- if (nPrimes[i] > nSize)
- return nPrimes[i];
+ if (nPrime > nSize)
+ return nPrime;
}
return nSize * 2;
}