diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2015-01-17 00:37:31 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-01-19 06:18:37 +0000 |
commit | 5901827bd44dc3600bf66c83882e6847439d59d6 (patch) | |
tree | 3e4477e7a25cb10d836f6dcba1c49fcbb9e637d4 /unoxml | |
parent | a1fb4ac1991a8da2e527b64a0a01a88a8f2959e3 (diff) |
fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings.
Change-Id: I1cd8b118e2598b8b18fb445851a3bb41e554267b
Reviewed-on: https://gerrit.libreoffice.org/13967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'unoxml')
-rw-r--r-- | unoxml/source/xpath/xpathapi.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx index a7346b9042bc..915d6660d53d 100644 --- a/unoxml/source/xpath/xpathapi.cxx +++ b/unoxml/source/xpath/xpathapi.cxx @@ -126,13 +126,12 @@ namespace XPath { nsmap_t::const_iterator i = nsmap.begin(); OString oprefix, ouri; - xmlChar *p, *u; while (i != nsmap.end()) { oprefix = OUStringToOString(i->first, RTL_TEXTENCODING_UTF8); ouri = OUStringToOString(i->second, RTL_TEXTENCODING_UTF8); - p = (xmlChar*)oprefix.getStr(); - u = (xmlChar*)ouri.getStr(); + xmlChar *p = (xmlChar*)oprefix.getStr(); + xmlChar *u = (xmlChar*)ouri.getStr(); xmlXPathRegisterNs(ctx, p, u); ++i; } |