summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_bytestring.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/cfx_bytestring.h')
-rw-r--r--core/fxcrt/cfx_bytestring.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/core/fxcrt/cfx_bytestring.h b/core/fxcrt/cfx_bytestring.h
index 261060bda0..432f28a06d 100644
--- a/core/fxcrt/cfx_bytestring.h
+++ b/core/fxcrt/cfx_bytestring.h
@@ -82,14 +82,8 @@ class CFX_ByteString {
return m_pData ? FXSYS_strlen(m_pData->m_String) : 0;
}
bool IsEmpty() const { return !GetLength(); }
-
- bool IsValidIndex(FX_STRSIZE index) const {
- return 0 <= index && index < GetLength();
- }
-
- bool IsValidLength(FX_STRSIZE length) const {
- return 0 <= length && length <= GetLength();
- }
+ bool IsValidIndex(FX_STRSIZE index) const { return index < GetLength(); }
+ bool IsValidLength(FX_STRSIZE length) const { return length <= GetLength(); }
int Compare(const CFX_ByteStringC& str) const;
bool EqualNoCase(const CFX_ByteStringC& str) const;