Skip to content

Commit

Permalink
a couple cast and try to get rid of a GCC warning, unclear if it worked
Browse files Browse the repository at this point in the history
  • Loading branch information
vberthiaume committed Dec 8, 2024
1 parent 405b406 commit 2a1ef10
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ if(MSVC)
target_link_libraries(SharedCode INTERFACE Dwmapi.lib)
endif()

#TODO: unclear that this does anything?
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
add_compile_options(-Wno-implicit-int-float-conversion)
endif()


# Link the JUCE plugin targets our SharedCode target
target_link_libraries("${PROJECT_NAME}" PRIVATE SharedCode)

Expand Down
2 changes: 1 addition & 1 deletion source/DSP/ProPhatVoice.h
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ void ProPhatVoice<T>::processRampUp (juce::dsp::AudioBlock<T>& block, int curBlo
#if DEBUG_VOICES
DBG ("\tDEBUG RAMP UP " + juce::String (rampUpSamples - rampUpSamplesLeft));
#endif
auto curRampUpLenght = juce::jmin ((int) curBlockSize, rampUpSamplesLeft);
auto curRampUpLenght = static_cast<float> (juce::jmin ((int) curBlockSize, rampUpSamplesLeft));
auto prevRampUpValue = (Constants::rampUpSamples - rampUpSamplesLeft) / (float) Constants::rampUpSamples;
auto nextRampUpValue = prevRampUpValue + curRampUpLenght / (float) Constants::rampUpSamples;
auto incr = (nextRampUpValue - prevRampUpValue) / (curRampUpLenght);
Expand Down
2 changes: 1 addition & 1 deletion source/UI/ProPhatEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ ProPhatEditor::ProPhatEditor (ProPhatProcessor& p)
addAndMakeVisible (group);

//setup components and labels
for (int i = 0; i < components.size (); ++i)
for (size_t i = 0; i < components.size (); ++i)
{
if (labels[i] != nullptr)
{
Expand Down

0 comments on commit 2a1ef10

Please sign in to comment.