diff --git a/include/SPTK/utils/uint24_t.h b/include/SPTK/utils/uint24_t.h index c69d4ff..67a9cae 100644 --- a/include/SPTK/utils/uint24_t.h +++ b/include/SPTK/utils/uint24_t.h @@ -28,7 +28,7 @@ class uint24_t { uint24_t() { } - template + template explicit uint24_t(T initial_value) { *this = static_cast(initial_value); } diff --git a/src/analysis/spectrum_extraction_by_world.cc b/src/analysis/spectrum_extraction_by_world.cc index b5016d1..00a1b03 100644 --- a/src/analysis/spectrum_extraction_by_world.cc +++ b/src/analysis/spectrum_extraction_by_world.cc @@ -62,7 +62,8 @@ bool SpectrumExtractionByWorld::Run( f0_floor = f0[i]; } } - if (f0_floor < world::GetF0FloorForCheapTrick(static_cast(sampling_rate_), fft_length_)) { + if (f0_floor < world::GetF0FloorForCheapTrick( + static_cast(sampling_rate_), fft_length_)) { return false; } diff --git a/src/main/pitch_mark.cc b/src/main/pitch_mark.cc index c1e7014..a5c9ef3 100644 --- a/src/main/pitch_mark.cc +++ b/src/main/pitch_mark.cc @@ -294,7 +294,9 @@ int main(int argc, char* argv[]) { switch (output_format) { case kBinarySequence: { - int next_pitch_mark(pitch_mark.empty() ? -1 : static_cast(std::round(pitch_mark[0]))); + int next_pitch_mark(pitch_mark.empty() + ? -1 + : static_cast(std::round(pitch_mark[0]))); for (int i(0), j(1); i < waveform_length; ++i) { if (i == next_pitch_mark) { if (!sptk::WriteStream(binary_polarity, &std::cout)) { @@ -334,7 +336,8 @@ int main(int argc, char* argv[]) { const double bias(kSine == output_format ? 0.0 : 0.5 * sptk::kPi); for (int n(0), i(0); n <= num_pitch_marks; ++n) { const int next_pitch_mark( - n < num_pitch_marks ? static_cast(std::round(pitch_mark[n])) : waveform_length); + n < num_pitch_marks ? static_cast(std::round(pitch_mark[n])) + : waveform_length); // Find the point across voiced region to unvoiced one. int j(i); for (; j < next_pitch_mark; ++j) { diff --git a/src/utils/sptk_utils.cc b/src/utils/sptk_utils.cc index d45bbbc..8fa6856 100644 --- a/src/utils/sptk_utils.cc +++ b/src/utils/sptk_utils.cc @@ -136,7 +136,8 @@ bool ReadStream(bool zero_padding, int stream_skip, int read_point, return false; // Something wrong! } - std::fill_n(sequence_to_read->begin() + end - num_zeros, num_zeros, static_cast(0)); + std::fill_n(sequence_to_read->begin() + end - num_zeros, num_zeros, + static_cast(0)); return !input_stream->bad(); } diff --git a/tools/Makefile b/tools/Makefile index d63ee3c..a3d4f5e 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -16,7 +16,7 @@ PYTHON_VERSION := 3.8 SHELLCHECK_VERSION := 0.9.0 -SHFMT_VERSION := 3.7.0 +SHFMT_VERSION := 3.8.0 JOBS := 4