diff options
author | Muhammet Kara <muhammet.kara@pardus.org.tr> | 2016-05-30 17:20:50 +0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-05 09:35:40 +0000 |
commit | b6b34d538398f8214daa5b160f764dc8b82ff9c5 (patch) | |
tree | 9ffb350c9cbd293618fab09efcff6c8ad06151b3 /tools | |
parent | 4ed2a7305f80192bdbe2eace48c4ee65e9938f7d (diff) |
Clarify calculation precedence tdf#39440
Use parentheses to clarify the code.
Change-Id: I864dc6dacadb5b9ba9dca8e0abd9fa4e6db1eddc
Reviewed-on: https://gerrit.libreoffice.org/25677
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/fsys/urlobj.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index c31e61a429a1..9061bf19a981 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -626,10 +626,10 @@ INetURLObject::FSysStyle guessFSysStyleByCounting(sal_Unicode const * pBegin, && pEnd - pBegin <= std::numeric_limits< sal_Int32 >::max(), "guessFSysStyleByCounting(): Too big"); sal_Int32 nSlashCount - = eStyle & INetURLObject::FSYS_UNX ? + = (eStyle & INetURLObject::FSYS_UNX) ? 0 : std::numeric_limits< sal_Int32 >::min(); sal_Int32 nBackslashCount - = eStyle & INetURLObject::FSYS_DOS ? + = (eStyle & INetURLObject::FSYS_DOS) ? 0 : std::numeric_limits< sal_Int32 >::min(); while (pBegin != pEnd) switch (*pBegin++) @@ -4262,9 +4262,9 @@ bool INetURLObject::setFSysPath(OUString const & rFSysPath, sal_Unicode const * pFSysBegin = rFSysPath.getStr(); sal_Unicode const * pFSysEnd = pFSysBegin + rFSysPath.getLength(); - switch ((eStyle & FSYS_VOS ? 1 : 0) - + (eStyle & FSYS_UNX ? 1 : 0) - + (eStyle & FSYS_DOS ? 1 : 0)) + switch (((eStyle & FSYS_VOS) ? 1 : 0) + + ((eStyle & FSYS_UNX) ? 1 : 0) + + ((eStyle & FSYS_DOS) ? 1 : 0)) { case 0: return false; @@ -4433,9 +4433,9 @@ OUString INetURLObject::getFSysPath(FSysStyle eStyle, if (m_eScheme != INetProtocol::File) return OUString(); - if ((eStyle & FSYS_VOS ? 1 : 0) - + (eStyle & FSYS_UNX ? 1 : 0) - + (eStyle & FSYS_DOS ? 1 : 0) + if (((eStyle & FSYS_VOS) ? 1 : 0) + + ((eStyle & FSYS_UNX) ? 1 : 0) + + ((eStyle & FSYS_DOS) ? 1 : 0) > 1) { eStyle = eStyle & FSYS_VOS |