diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-22 10:21:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-28 10:47:34 +0200 |
commit | bfc1600c6ade6f006eb774bffe7caa9c948e8603 (patch) | |
tree | c660fa18fc6a9e5f05c3cc58fa34411cdc4f4257 /sal/osl | |
parent | f9514beb9bfed51aee69227797e74504afed31c6 (diff) |
loplugin:indentation improve checks for brace alignment
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal/osl')
-rw-r--r-- | sal/osl/all/log.cxx | 32 | ||||
-rw-r--r-- | sal/osl/unx/file_stat.cxx | 10 |
2 files changed, 21 insertions, 21 deletions
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx index c493f4ddf03e..405d5599ccae 100644 --- a/sal/osl/all/log.cxx +++ b/sal/osl/all/log.cxx @@ -184,24 +184,24 @@ std::pair<bool, bool> getTimestampFlags(char const *selector) bool outputTimestamp = false; bool outputRelativeTimer = false; for (char const* p = selector; p && *p;) - { + { if (*p++ == '+') - { - char const * p1 = p; - while (*p1 != '.' && *p1 != '+' && *p1 != '-' && *p1 != '\0') { - ++p1; - } - if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("TIMESTAMP"))) - outputTimestamp = true; - else if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("RELATIVETIMER"))) - outputRelativeTimer = true; - char const * p2 = p1; - while (*p2 != '+' && *p2 != '-' && *p2 != '\0') { - ++p2; - } - p = p2; + { + char const * p1 = p; + while (*p1 != '.' && *p1 != '+' && *p1 != '-' && *p1 != '\0') { + ++p1; } - } + if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("TIMESTAMP"))) + outputTimestamp = true; + else if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("RELATIVETIMER"))) + outputRelativeTimer = true; + char const * p2 = p1; + while (*p2 != '+' && *p2 != '-' && *p2 != '\0') { + ++p2; + } + p = p2; + } + } return std::pair(outputTimestamp, outputRelativeTimer); } diff --git a/sal/osl/unx/file_stat.cxx b/sal/osl/unx/file_stat.cxx index 4d7a7cb43da5..d08a6ed56894 100644 --- a/sal/osl/unx/file_stat.cxx +++ b/sal/osl/unx/file_stat.cxx @@ -148,10 +148,10 @@ namespace void set_file_size(const struct stat& file_stat, oslFileStatus* pStat) { if (S_ISREG(file_stat.st_mode)) - { - pStat->uFileSize = file_stat.st_size; - pStat->uValidFields |= osl_FileStatus_Mask_FileSize; - } + { + pStat->uFileSize = file_stat.st_size; + pStat->uValidFields |= osl_FileStatus_Mask_FileSize; + } } /* we only need to call stat or lstat if one of the @@ -262,7 +262,7 @@ oslFileError SAL_CALL osl_getFileStatus(oslDirectoryItem Item, oslFileStatus* pS | RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT)); assert(ok); (void)ok; pStat->uValidFields |= osl_FileStatus_Mask_FileName; - } + } return osl_File_E_None; } |