Ignore pointless clang-tidy warning. (#237)

* Ignore pointless clang-tidy warning.

It wants you to write type suffixes for integers using uppercase. Let's
just disable this warning.

https://clang.llvm.org/extra/clang-tidy/checks/readability-uppercase-literal-suffix.html

* Clean up bugprone-narrowing-conversion
This commit is contained in:
Thom Wiggers 2019-09-23 17:16:58 +02:00 committed by Matthias J. Kannwischer
parent bdb42f1911
commit 993803e02d
3 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
---
Checks: '*,-llvm-header-guard,-hicpp-*,-readability-function-size,-google-readability-todo,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-readability-isolate-declaration'
Checks: '*,-llvm-header-guard,-hicpp-*,-readability-function-size,-google-readability-todo,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-readability-isolate-declaration,-readability-uppercase-literal-suffix'
WarningsAsErrors: '*'
HeaderFilterRegex: '.*'
AnalyzeTemporaryDtors: false

View File

@ -953,7 +953,7 @@ sampler(void *ctx, fpr mu, fpr isigma) {
* centered on 0.
*/
z0 = gaussian0_sampler(&spc->p);
b = prng_get_u8(&spc->p) & 1;
b = (int)prng_get_u8(&spc->p) & 1;
z = b + ((b << 1) - 1) * z0;
/*

View File

@ -953,7 +953,7 @@ sampler(void *ctx, fpr mu, fpr isigma) {
* centered on 0.
*/
z0 = gaussian0_sampler(&spc->p);
b = prng_get_u8(&spc->p) & 1;
b = (int)prng_get_u8(&spc->p) & 1;
z = b + ((b << 1) - 1) * z0;
/*