aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/.clang-tidy6
-rw-r--r--plugins/eg-sampler.lv2/peaks.h4
-rw-r--r--plugins/eg-sampler.lv2/sampler.c2
3 files changed, 8 insertions, 4 deletions
diff --git a/plugins/.clang-tidy b/plugins/.clang-tidy
index b1adcb3..bff0bfd 100644
--- a/plugins/.clang-tidy
+++ b/plugins/.clang-tidy
@@ -5,7 +5,6 @@ Checks: >
*,
-*-magic-numbers,
-*-narrowing-conversions,
- -*-uppercase-literal-suffix,
-altera-*,
-bugprone-easily-swappable-parameters,
-bugprone-macro-parentheses,
@@ -20,3 +19,8 @@ Checks: >
WarningsAsErrors: '*'
HeaderFilterRegex: '.*'
FormatStyle: file
+CheckOptions:
+ - key: hicpp-uppercase-literal-suffix.NewSuffixes
+ value: L;U;f
+ - key: readability-uppercase-literal-suffix.NewSuffixes
+ value: L;U;f
diff --git a/plugins/eg-sampler.lv2/peaks.h b/plugins/eg-sampler.lv2/peaks.h
index 7e0997e..47d6616 100644
--- a/plugins/eg-sampler.lv2/peaks.h
+++ b/plugins/eg-sampler.lv2/peaks.h
@@ -152,11 +152,11 @@ peaks_sender_send(PeaksSender* sender,
forge, &vec_frame, sizeof(float), uris->atom_Float);
// Calculate how many peaks to send this update
- const uint32_t chunk_size = MAX(1u, sender->n_samples / sender->n_peaks);
+ const uint32_t chunk_size = MAX(1U, sender->n_samples / sender->n_peaks);
const uint32_t space = forge->size - forge->offset;
const uint32_t remaining = sender->n_peaks - sender->current_offset;
const uint32_t n_update =
- MIN(remaining, MIN(n_frames / 4u, space / sizeof(float)));
+ MIN(remaining, MIN(n_frames / 4U, space / sizeof(float)));
// Calculate peak (maximum magnitude) for each chunk
for (uint32_t i = 0; i < n_update; ++i) {
diff --git a/plugins/eg-sampler.lv2/sampler.c b/plugins/eg-sampler.lv2/sampler.c
index 9ec3cf4..d870a07 100644
--- a/plugins/eg-sampler.lv2/sampler.c
+++ b/plugins/eg-sampler.lv2/sampler.c
@@ -134,7 +134,7 @@ load_sample(LV2_Log_Logger* logger, const char* path, const int sample_rate)
return NULL;
}
- sf_seek(sndfile, 0ul, SEEK_SET);
+ sf_seek(sndfile, 0UL, SEEK_SET);
sf_read_float(sndfile, data, info->frames * info->channels);
sf_close(sndfile);