summaryrefslogtreecommitdiff
path: root/sc/workben
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2014-12-20 20:47:39 +0100
committerJulien Nabet <serval2412@yahoo.fr>2014-12-21 19:07:03 +0100
commit8870e068cc7368ffa14a6938836b370d2a188b64 (patch)
treede1cc65476db4132af13ca0950af92a65cec6e67 /sc/workben
parent17402c73cfd513ade823a5f26c17371766047b6d (diff)
fdo#39440 sc: reduce scope of local variables
This addresses some cppcheck warnings. Change-Id: Icd031be4aeec07ba60804923e3506d64cf876dd8
Diffstat (limited to 'sc/workben')
-rw-r--r--sc/workben/dpcache/perf-test.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/sc/workben/dpcache/perf-test.cpp b/sc/workben/dpcache/perf-test.cpp
index 955548ff28f8..000188a41494 100644
--- a/sc/workben/dpcache/perf-test.cpp
+++ b/sc/workben/dpcache/perf-test.cpp
@@ -92,11 +92,10 @@ bool has_item(const values_type& items, const indices_type& order, int val, long
bool found = false;
long low = 0;
long high = items.size() - 1;
- long comp_res;
while (low <= high)
{
long this_index = (low + high) / 2;
- comp_res = compare(items[order[this_index]], val);
+ const long comp_res = compare(items[order[this_index]], val);
if (comp_res < 0)
low = this_index + 1;
else