summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-11-22 14:12:34 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-11-22 19:16:52 +0100
commit72ef2b5d9802c424dbb0810e0a72fae50d92b678 (patch)
treec043fd16189d55fcc549589cecf145bb522089e6 /hwpfilter
parentb140f92531396c1087b997852d7ece18429b79d1 (diff)
Make loplugin:unnecessaryparen warn about (x) ? ... : ... after all
...which had been left out because "lots of our code uses this style, which I'm loathe to bulk-fix as yet", but now in <https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have caused an otherwise innocent-looking code change to trigger a loplugin:unnecessaryparen warning for pFormat = (pGrfObj) ? ... (barring a change to ignoreAllImplicit in compilerplugins/clang/unnecessaryparen.cxx similar to that in <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent", which should also have caused the warning to disappear for the modified code, IIUC). Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2 Reviewed-on: https://gerrit.libreoffice.org/45088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/hbox.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx
index 87f3ef0c9db6..388c990ee762 100644
--- a/hwpfilter/source/hbox.cxx
+++ b/hwpfilter/source/hbox.cxx
@@ -156,7 +156,7 @@ hchar_string DateCode::GetString()
for (; *fmt && ((int) ret.size() < DATE_SIZE); fmt++)
{
- form = (add_zero) ? "%02d" : "%d";
+ form = add_zero ? "%02d" : "%d";
add_zero = false;
is_pm = (date[HOUR] >= 12);
@@ -230,13 +230,13 @@ hchar_string DateCode::GetString()
break;
case '7':
ret.push_back(0xB5A1);
- ret.push_back((is_pm) ? 0xD281 : 0xB8E5);
+ ret.push_back(is_pm ? 0xD281 : 0xB8E5);
break;
case '&':
- strncat(cbuf, (is_pm) ? "p.m." : "a.m.", sizeof(cbuf) - strlen(cbuf) - 1);
+ strncat(cbuf, is_pm ? "p.m." : "a.m.", sizeof(cbuf) - strlen(cbuf) - 1);
break;
case '+':
- strncat(cbuf, (is_pm) ? "P.M." : "A.M.", sizeof(cbuf) - strlen(cbuf) - 1);
+ strncat(cbuf, is_pm ? "P.M." : "A.M.", sizeof(cbuf) - strlen(cbuf) - 1);
break;
case '8': // 2.5 feature
case '9':