diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-04-20 17:18:55 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-04-20 17:25:48 +0200 |
commit | abe81a0b7b5014aefec1ede55cc6b7b947c47484 (patch) | |
tree | 769331fe1b6fbdee41dff85b8259e5d275ab5dc2 /sal/rtl | |
parent | b8f04b740fe3e61269daeccbbb9bc5752e5fd5b3 (diff) |
loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I6c656f991999791469015500aff1905fdb16ba65
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/byteseq.cxx | 4 | ||||
-rw-r--r-- | sal/rtl/locale.cxx | 10 | ||||
-rw-r--r-- | sal/rtl/string.cxx | 4 | ||||
-rw-r--r-- | sal/rtl/strtmpl.cxx | 6 | ||||
-rw-r--r-- | sal/rtl/ustring.cxx | 8 |
5 files changed, 16 insertions, 16 deletions
diff --git a/sal/rtl/byteseq.cxx b/sal/rtl/byteseq.cxx index 891c492f2db2..d0c77b5dc1ed 100644 --- a/sal/rtl/byteseq.cxx +++ b/sal/rtl/byteseq.cxx @@ -219,11 +219,11 @@ sal_Bool SAL_CALL rtl_byte_sequence_equals( sal_Sequence *pSequence1 , sal_Seque assert(pSequence1 && pSequence2); if (pSequence1 == pSequence2) { - return sal_True; + return true; } if (pSequence1->nElements != pSequence2->nElements) { - return sal_False; + return false; } return memcmp( diff --git a/sal/rtl/locale.cxx b/sal/rtl/locale.cxx index bd232c1a768a..751c23c5a941 100644 --- a/sal/rtl/locale.cxx +++ b/sal/rtl/locale.cxx @@ -170,13 +170,13 @@ sal_Bool rtl_hashtable_grow(RTL_HASHTABLE** table) rtl_freeMemory((*table)); (*table) = pNewTable; - return sal_True; + return true; } extern "C" sal_Bool rtl_hashtable_find(RTL_HASHTABLE * table, sal_Int32 key, sal_Int32 hashCode, rtl_Locale** pValue) { if (!table) - return sal_False; + return false; if (table->Table[key]) { @@ -188,11 +188,11 @@ extern "C" sal_Bool rtl_hashtable_find(RTL_HASHTABLE * table, sal_Int32 key, sal if (pEntry) *pValue = pEntry->Entry; else - return sal_False; + return false; } else - return sal_False; + return false; - return sal_True; + return true; } /************************************************************************* diff --git a/sal/rtl/string.cxx b/sal/rtl/string.cxx index 98954fab90fa..863d6b870b3e 100644 --- a/sal/rtl/string.cxx +++ b/sal/rtl/string.cxx @@ -94,7 +94,7 @@ sal_Int32 SAL_CALL rtl_str_valueOfFloat(sal_Char * pStr, float f) rtl_math_doubleToString( &pResult, nullptr, 0, f, rtl_math_StringFormat_G, RTL_STR_MAX_VALUEOFFLOAT - RTL_CONSTASCII_LENGTH("-x.E-xxx"), '.', nullptr, 0, - sal_True); + true); nLen = pResult->length; OSL_ASSERT(nLen < RTL_STR_MAX_VALUEOFFLOAT); memcpy(pStr, pResult->buffer, (nLen + 1) * sizeof(sal_Char)); @@ -111,7 +111,7 @@ sal_Int32 SAL_CALL rtl_str_valueOfDouble(sal_Char * pStr, double d) rtl_math_doubleToString( &pResult, nullptr, 0, d, rtl_math_StringFormat_G, RTL_STR_MAX_VALUEOFDOUBLE - RTL_CONSTASCII_LENGTH("-x.E-xxx"), '.', nullptr, - 0, sal_True); + 0, true); nLen = pResult->length; OSL_ASSERT(nLen < RTL_STR_MAX_VALUEOFDOUBLE); memcpy(pStr, pResult->buffer, (nLen + 1) * sizeof(sal_Char)); diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx index df0d1a2e52cf..f188cb1e9d42 100644 --- a/sal/rtl/strtmpl.cxx +++ b/sal/rtl/strtmpl.cxx @@ -972,7 +972,7 @@ sal_Bool SAL_CALL IMPL_RTL_STRNAME( toBoolean )( const IMPL_RTL_STRCODE* pStr ) { assert(pStr); if ( *pStr == '1' ) - return sal_True; + return true; if ( (*pStr == 'T') || (*pStr == 't') ) { @@ -984,12 +984,12 @@ sal_Bool SAL_CALL IMPL_RTL_STRNAME( toBoolean )( const IMPL_RTL_STRCODE* pStr ) { pStr++; if ( (*pStr == 'E') || (*pStr == 'e') ) - return sal_True; + return true; } } } - return sal_False; + return false; } /* ----------------------------------------------------------------------- */ diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx index db07cabb396b..b00c9c80ef76 100644 --- a/sal/rtl/ustring.cxx +++ b/sal/rtl/ustring.cxx @@ -154,7 +154,7 @@ sal_Int32 SAL_CALL rtl_ustr_valueOfFloat(sal_Unicode * pStr, float f) rtl_math_doubleToUString( &pResult, nullptr, 0, f, rtl_math_StringFormat_G, RTL_USTR_MAX_VALUEOFFLOAT - RTL_CONSTASCII_LENGTH("-x.E-xxx"), '.', nullptr, - 0, sal_True); + 0, true); nLen = pResult->length; OSL_ASSERT(nLen < RTL_USTR_MAX_VALUEOFFLOAT); memcpy(pStr, pResult->buffer, (nLen + 1) * sizeof(sal_Unicode)); @@ -171,7 +171,7 @@ sal_Int32 SAL_CALL rtl_ustr_valueOfDouble(sal_Unicode * pStr, double d) rtl_math_doubleToUString( &pResult, nullptr, 0, d, rtl_math_StringFormat_G, RTL_USTR_MAX_VALUEOFDOUBLE - RTL_CONSTASCII_LENGTH("-x.E-xxx"), '.', nullptr, - 0, sal_True); + 0, true); nLen = pResult->length; OSL_ASSERT(nLen < RTL_USTR_MAX_VALUEOFDOUBLE); memcpy(pStr, pResult->buffer, (nLen + 1) * sizeof(sal_Unicode)); @@ -350,10 +350,10 @@ sal_Bool SAL_CALL rtl_ustr_asciil_reverseEquals_WithLength( const sal_Unicode* p pStr1Run--; pStr2Run--; if( *pStr1Run != (sal_Unicode)*pStr2Run ) - return sal_False; + return false; } - return sal_True; + return true; } /* ----------------------------------------------------------------------- */ |