summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-01-26 16:31:43 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-01-26 16:36:09 +0100
commitf1bca26afcc7593d0124c216c0400a9e2e47fc1d (patch)
tree37557f9a9afd815c4389ce7c4b3c47380829ef51 /ucb
parent8e681942f771d7beae52b1e786fab16e6a653ab1 (diff)
Remove redundant braces around for loops
...that had once been workarounds for compilers that did not yet support the C++98 scoping rules for declarations in for-init-statements. Change-Id: I51dc42982b30bf3adea6de1a10a91c0b4b4acfbe
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/ftp/ftpdirp.cxx4
-rw-r--r--ucb/workben/cachemap/cachemaptest.cxx30
2 files changed, 22 insertions, 12 deletions
diff --git a/ucb/source/ucp/ftp/ftpdirp.cxx b/ucb/source/ucp/ftp/ftpdirp.cxx
index c847a32d7acf..f618019d3019 100644
--- a/ucb/source/ucp/ftp/ftpdirp.cxx
+++ b/ucb/source/ucp/ftp/ftpdirp.cxx
@@ -783,12 +783,12 @@ sal_Bool FTPDirectoryParser::parseVMS (
// Parse <year> part and set entry date's year:
sal_uInt16 nYear = 0;
- {for (int i = 0; i < 2; ++i)
+ for (int i = 0; i < 2; ++i)
{
if (*p < '0' || *p > '9')
return sal_False;
nYear = 10 * nYear + (*p++ - '0');
- }}
+ }
if (*p >= '0' && *p <= '9')
{
nYear = 10 * nYear + (*p++ - '0');
diff --git a/ucb/workben/cachemap/cachemaptest.cxx b/ucb/workben/cachemap/cachemaptest.cxx
index f486fbae05de..477be2673568 100644
--- a/ucb/workben/cachemap/cachemaptest.cxx
+++ b/ucb/workben/cachemap/cachemaptest.cxx
@@ -53,11 +53,13 @@ sal_uInt32 test(Obj *)
+ rtl::OUString::valueOf(static_cast< sal_Int32 >(
i % 100)));
rtl::Reference< Obj > xObj01(xCont->get(aKey0));
- {for (int j = 0; j < 50; ++j)
+ for (int j = 0; j < 50; ++j)
+ {
rtl::Reference< Obj > xRef(xObj01);
}
rtl::Reference< Obj > xObj02(xCont->get(aKey0));
- {for (int j = 0; j < 50; ++j)
+ for (int j = 0; j < 50; ++j)
+ {
rtl::Reference< Obj > xRef(xObj02);
}
@@ -66,11 +68,13 @@ sal_uInt32 test(Obj *)
+ rtl::OUString::valueOf(static_cast< sal_Int32 >(
(i + 1) % 100)));
rtl::Reference< Obj > xObj11(xCont->get(aKey1));
- {for (int j = 0; j < 50; ++j)
+ for (int j = 0; j < 50; ++j)
+ {
rtl::Reference< Obj > xRef(xObj11);
}
rtl::Reference< Obj > xObj12(xCont->get(aKey1));
- {for (int j = 0; j < 50; ++j)
+ for (int j = 0; j < 50; ++j)
+ {
rtl::Reference< Obj > xRef(xObj12);
}
@@ -79,11 +83,13 @@ sal_uInt32 test(Obj *)
+ rtl::OUString::valueOf(static_cast< sal_Int32 >(
(i + 2) % 100)));
rtl::Reference< Obj > xObj21(xCont->get(aKey2));
- {for (int j = 0; j < 50; ++j)
+ for (int j = 0; j < 50; ++j)
+ {
rtl::Reference< Obj > xRef(xObj21);
}
rtl::Reference< Obj > xObj22(xCont->get(aKey2));
- {for (int j = 0; j < 50; ++j)
+ for (int j = 0; j < 50; ++j)
+ {
rtl::Reference< Obj > xRef(xObj22);
}
@@ -92,11 +98,13 @@ sal_uInt32 test(Obj *)
+ rtl::OUString::valueOf(static_cast< sal_Int32 >(
(i + 3) % 100)));
rtl::Reference< Obj > xObj31(xCont->get(aKey3));
- {for (int j = 0; j < 50; ++j)
+ for (int j = 0; j < 50; ++j)
+ {
rtl::Reference< Obj > xRef(xObj31);
}
rtl::Reference< Obj > xObj32(xCont->get(aKey3));
- {for (int j = 0; j < 50; ++j)
+ for (int j = 0; j < 50; ++j)
+ {
rtl::Reference< Obj > xRef(xObj32);
}
@@ -105,11 +113,13 @@ sal_uInt32 test(Obj *)
+ rtl::OUString::valueOf(static_cast< sal_Int32 >(
(i + 4) % 100)));
rtl::Reference< Obj > xObj41(xCont->get(aKey4));
- {for (int j = 0; j < 50; ++j)
+ for (int j = 0; j < 50; ++j)
+ {
rtl::Reference< Obj > xRef(xObj41);
}
rtl::Reference< Obj > xObj42(xCont->get(aKey4));
- {for (int j = 0; j < 50; ++j)
+ for (int j = 0; j < 50; ++j)
+ {
rtl::Reference< Obj > xRef(xObj42);
}
}