[Libreoffice-commits] .: Branch 'feature/killsdf' - l10ntools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Sep 30 08:11:52 PDT 2012
l10ntools/source/po.cxx | 10 ++++++----
l10ntools/source/renewpo.cxx | 7 ++++---
2 files changed, 10 insertions(+), 7 deletions(-)
New commits:
commit 9baaced8b636e23045495c9a018d0859a9df8e76
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Sat Sep 29 21:01:30 2012 +0200
Not use initializer-list for vector
Change-Id: I6ed72b28be3ad00224cbf7308b4f27a6fb25e24e
Reviewed-on: https://gerrit.libreoffice.org/726
Reviewed-by: Andras Timar <atimar at suse.com>
Tested-by: Andras Timar <atimar at suse.com>
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index f433aab..b2082a7 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -338,10 +338,12 @@ void ImplFindAllTag(const OString& rText,std::vector<OString>& o_vFoundTags)
OString ImplEscapeTags(const OString& rText)
{
typedef std::vector<OString> StrVec;
- const StrVec vTagsForEscape =
- { "ahelp", "link", "item", "emph", "defaultinline",
- "switchinline", "caseinline", "variable",
- "bookmark_value", "image", "embedvar", "alt" };
+ const OString vInitializer[] = {
+ "ahelp", "link", "item", "emph", "defaultinline",
+ "switchinline", "caseinline", "variable",
+ "bookmark_value", "image", "embedvar", "alt" };
+ const StrVec vTagsForEscape( vInitializer,
+ vInitializer + sizeof(vInitializer) / sizeof(vInitializer[0]) );
StrVec vFoundTags;
ImplFindAllTag(rText,vFoundTags);
OString sResult = rText;
diff --git a/l10ntools/source/renewpo.cxx b/l10ntools/source/renewpo.cxx
index 398b23b..39152a7 100644
--- a/l10ntools/source/renewpo.cxx
+++ b/l10ntools/source/renewpo.cxx
@@ -116,9 +116,10 @@ void HandleLanguage(struct dirent* pLangEntry, const OString& rPath,
{
sActTrans ="";
}
- const vector<PoEntry::TYPE> vTypes = { PoEntry::TTEXT,
- PoEntry::TQUICKHELPTEXT,
- PoEntry::TTITLE };
+ const PoEntry::TYPE vInitializer[] =
+ { PoEntry::TTEXT, PoEntry::TQUICKHELPTEXT, PoEntry::TTITLE };
+ const vector<PoEntry::TYPE> vTypes( vInitializer,
+ vInitializer + sizeof(vInitializer) / sizeof(vInitializer[0]) );
unsigned short nDummyBit = 0;
for( unsigned nIndex=0; nIndex<vTypes.size(); ++nIndex)
{
More information about the Libreoffice-commits
mailing list