diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-03-30 09:36:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-30 12:21:40 +0000 |
commit | da56de9ac4824eb365af20b351719395e725be39 (patch) | |
tree | f19ad159f5e12b9e62b2ee50f39016819b7a7c5c /sal | |
parent | 8d1a56c206e5c2ed6c331049198bb8ebc6176171 (diff) |
remove type decorations on char literals
they are only needed where type deduction fails.
left them in defines for now.
Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09
Reviewed-on: https://gerrit.libreoffice.org/35893
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/file_path_helper.cxx | 8 | ||||
-rw-r--r-- | sal/osl/unx/tempfile.cxx | 2 | ||||
-rw-r--r-- | sal/osl/w32/file_url.cxx | 2 | ||||
-rw-r--r-- | sal/qa/osl/file/osl_File.cxx | 6 | ||||
-rw-r--r-- | sal/qa/osl/security/osl_Security.cxx | 4 | ||||
-rw-r--r-- | sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx index 587d97ad6453..df90ca952be2 100644 --- a/sal/osl/unx/file_path_helper.cxx +++ b/sal/osl/unx/file_path_helper.cxx @@ -24,9 +24,9 @@ #include <rtl/ustring.hxx> #include <sal/log.hxx> -const sal_Unicode FPH_CHAR_PATH_SEPARATOR = (sal_Unicode)'/'; -const sal_Unicode FPH_CHAR_DOT = (sal_Unicode)'.'; -const sal_Unicode FPH_CHAR_COLON = (sal_Unicode)':'; +const sal_Unicode FPH_CHAR_PATH_SEPARATOR = '/'; +const sal_Unicode FPH_CHAR_DOT = '.'; +const sal_Unicode FPH_CHAR_COLON = ':'; inline const rtl::OUString FPH_PATH_SEPARATOR() { return rtl::OUString(FPH_CHAR_PATH_SEPARATOR); } @@ -47,7 +47,7 @@ void SAL_CALL osl_systemPathRemoveSeparator(rtl_uString* pustrPath) while ((pustrPath->length > 1) && (pustrPath->buffer[pustrPath->length - 1] == FPH_CHAR_PATH_SEPARATOR)) { pustrPath->length--; - pustrPath->buffer[pustrPath->length] = (sal_Unicode)'\0'; + pustrPath->buffer[pustrPath->length] = '\0'; } SAL_WARN_IF( !((0 == pustrPath->length) || (1 == pustrPath->length) || diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx index 4980448089fb..f02cd3dcb6a5 100644 --- a/sal/osl/unx/tempfile.cxx +++ b/sal/osl/unx/tempfile.cxx @@ -206,7 +206,7 @@ static oslFileError osl_create_temp_file_impl_( /* ensure that the last character is a '/' */ - if ((sal_Unicode)'/' != puchr[len_base_dir - 1]) + if ('/' != puchr[len_base_dir - 1]) { rtl_uStringbuffer_insert_ascii( &tmp_file_path, diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_url.cxx index ce61eb1cb085..c1b84cbf5a02 100644 --- a/sal/osl/w32/file_url.cxx +++ b/sal/osl/w32/file_url.cxx @@ -694,7 +694,7 @@ oslFileError osl_getSystemPathFromFileURL_( rtl_uString *strURL, rtl_uString **p { rtl_uString_newFromStr_WithLength( &strTempPath, aBuf, nNewLen ); } - else if ( pDecodedURL[nSkip] == (sal_Unicode)'\\' && pDecodedURL[nSkip+1] == (sal_Unicode)'\\' ) + else if ( pDecodedURL[nSkip] == '\\' && pDecodedURL[nSkip+1] == '\\' ) { /* it should be an UNC path, use the according prefix */ rtl_uString *strSuffix = nullptr; diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 8faad6e8c4d6..77ddcdede871 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -137,14 +137,14 @@ inline bool compareFileName( const ::rtl::OUString & ustr1, const ::rtl::OUStrin //on Windows, the separator is '\', so here change to '/', then compare #if defined(_WIN32) ::rtl::OUString ustr1new,ustr2new; - sal_Unicode reverseSlash = (sal_Unicode)'\\'; + sal_Unicode reverseSlash = '\\'; if (ustr1.lastIndexOf(reverseSlash) != -1) - ustr1new = ustr1.replace(reverseSlash,(sal_Unicode)'/'); + ustr1new = ustr1.replace(reverseSlash,'/'); else ustr1new = ustr1; if (ustr2.lastIndexOf(reverseSlash) != -1) - ustr2new = ustr2.replace(reverseSlash,(sal_Unicode)'/'); + ustr2new = ustr2.replace(reverseSlash,'/'); else ustr2new = ustr2; bOk = ustr1new.equalsIgnoreAsciiCase( ustr2new ) ; diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx index 8cd5f1257f62..d4f575122963 100644 --- a/sal/qa/osl/security/osl_Security.cxx +++ b/sal/qa/osl/security/osl_Security.cxx @@ -98,12 +98,12 @@ namespace osl_Security } CPPUNIT_TEST_SUITE( logonUser ); - if ( !aStringForward.isEmpty() && aStringForward.indexOf( (sal_Unicode)' ' ) != -1 && ( aStringForward.indexOf( ( sal_Unicode ) ' ' ) == aStringForward.lastIndexOf( ( sal_Unicode ) ' ' ) ) ) + if ( !aStringForward.isEmpty() && aStringForward.indexOf( ' ' ) != -1 && ( aStringForward.indexOf( ' ' ) == aStringForward.lastIndexOf( ' ' ) ) ) /// if user name and passwd are forwarded { CPPUNIT_TEST( logonUser_user_pwd ); } - if ( !aStringForward.isEmpty() && aStringForward.indexOf( (sal_Unicode)' ' ) != -1 && ( aStringForward.indexOf( ( sal_Unicode ) ' ' ) != aStringForward.lastIndexOf( ( sal_Unicode ) ' ' ) ) ) + if ( !aStringForward.isEmpty() && aStringForward.indexOf( ' ' ) != -1 && ( aStringForward.indexOf( ' ' ) != aStringForward.lastIndexOf( ' ' ) ) ) /// if user name and passwd and file server are forwarded { CPPUNIT_TEST( logonUser_user_pwd_server ); diff --git a/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx b/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx index 13310768470c..7cc5c8fbb8cd 100644 --- a/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx +++ b/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx @@ -44,7 +44,7 @@ void test::oustringbuffer::ToString::testToString() { rtl::OUString str = sb.toString(); CPPUNIT_ASSERT_EQUAL( rtl::OUString("test string"), str ); // returned OUString must be independent from sb - sb.append( (sal_Unicode)'a' ); + sb.append( 'a' ); CPPUNIT_ASSERT_EQUAL( rtl::OUString("test string"), str ); sb.setLength(0); CPPUNIT_ASSERT_EQUAL( rtl::OUString("test string"), str ); |