diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-19 21:29:43 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-19 21:29:43 +0200 |
commit | 82da3d95c1bb2ba410a89fc1721b1ccb4f25b7cb (patch) | |
tree | 87a34da45d7048338a097c8a578354ba326c24d8 /stoc/source | |
parent | c3a5012c5a9699040698505d3e34672382c026b8 (diff) |
loplugin:salbool: Implicit conversions from non-Boolean fundamental types
Change-Id: I67eac95686678e6f5a2d60798535b2c65a9ba5d7
Diffstat (limited to 'stoc/source')
-rw-r--r-- | stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx index 2f1297913d67..8405ad7f5c92 100644 --- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx +++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx @@ -135,28 +135,31 @@ OUString parsePart( return buf.makeStringAndClear(); } -namespace -{ - OUString encodeNameOrParamFragment( OUString const & fragment ) - { - static sal_Bool const aCharClass[] = - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* NameOrParamFragment */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, /* !"#$%&'()*+,-./*/ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, /*0123456789:;<=>?*/ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*@ABCDEFGHIJKLMNO*/ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, /*PQRSTUVWXYZ[\]^_*/ - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*`abcdefghijklmno*/ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0 /*pqrstuvwxyz{|}~ */ - }; - - return rtl::Uri::encode( - fragment, - aCharClass, - rtl_UriEncodeIgnoreEscapes, - RTL_TEXTENCODING_UTF8 - ); - } +namespace { + +OUString encodeNameOrParamFragment(OUString const & fragment) { + static sal_Bool const nameOrParamFragment[] = { + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, false, false, false, false, false, false, false, + false, true, false, false, true, false, false, true, // !"#$%&' + true, true, true, true, true, true, true, false, // ()*+,-./ + true, true, true, true, true, true, true, true, // 01234567 + true, true, true, true, false, false, false, false, // 89:;<=>? + true, true, true, true, true, true, true, true, // @ABCDEFG + true, true, true, true, true, true, true, true, // HIJKLMNO + true, true, true, true, true, true, true, true, // PQRSTUVW + true, true, true, true, false, true, false, true, // XYZ[\]^_ + false, true, true, true, true, true, true, true, // `abcdefg + true, true, true, true, true, true, true, true, // hijklmno + true, true, true, true, true, true, true, true, // pqrstuvw + true, true, true, false, false, false, true, false}; // xyz{|}~ + return rtl::Uri::encode( + fragment, nameOrParamFragment, rtl_UriEncodeIgnoreEscapes, + RTL_TEXTENCODING_UTF8); +} + } bool parseSchemeSpecificPart(OUString const & part) { |