summaryrefslogtreecommitdiff
path: root/sal/osl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-19 21:29:43 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-19 21:29:43 +0200
commit82da3d95c1bb2ba410a89fc1721b1ccb4f25b7cb (patch)
tree87a34da45d7048338a097c8a578354ba326c24d8 /sal/osl
parentc3a5012c5a9699040698505d3e34672382c026b8 (diff)
loplugin:salbool: Implicit conversions from non-Boolean fundamental types
Change-Id: I67eac95686678e6f5a2d60798535b2c65a9ba5d7
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/unx/file_url.cxx35
1 files changed, 23 insertions, 12 deletions
diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx
index 6c279f57cbbf..6eb3f251547f 100644
--- a/sal/osl/unx/file_url.cxx
+++ b/sal/osl/unx/file_url.cxx
@@ -64,18 +64,29 @@
using namespace osl;
-/* a slightly modified version of Pchar in rtl/source/uri.c */
-const sal_Bool uriCharClass[128] =
-{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* Pchar but without encoding slashes */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* !"#$%&'()*+,-./ */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 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, 0, 0, 0, 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{|}~ */
-};
+namespace {
+
+// A slightly modified version of Pchar in rtl/source/uri.c, but without
+// encoding slashes:
+const sal_Bool uriCharClass[128] = {
+ 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, true, true, // !"#$%&'
+ true, true, true, true, true, true, true, true, // ()*+,-./
+ true, true, true, true, true, true, true, true, // 01234567
+ true, true, true, false, false, true, 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, false, false, false, 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{|}~
+
+}
oslFileError SAL_CALL osl_getCanonicalName( rtl_uString* ustrFileURL, rtl_uString** pustrValidURL )
{