Replace always true condition with a more likely one
indexOf is always lower than string length since "not found" is encoded as -1. Original code works correctly anyway since the "not found" case lead to copying the whole string, although this copy is completely unnecessary. Change-Id: Ic5dd995dd0c3f974c77b5bf209ad5e994b044385 Reviewed-on: https://gerrit.libreoffice.org/67320 Tested-by: Jenkins Reviewed-by:Matteo Casalin <matteo.casalin@yahoo.com>
Showing
Please
register
or
sign in
to comment