Skip to content

Commit

Permalink
Upgraded to C++20
Browse files Browse the repository at this point in the history
  • Loading branch information
ffAudio committed May 13, 2024
1 parent 6858eac commit 4d9513a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
name: ${{ matrix.os }} - ${{ matrix.build_type }}
strategy:
matrix:
os: [macos-latest, windows-latest]
os: [macos-13, windows-latest]
build_type: [Debug, Release]
fail-fast: false

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY DEBUG_CONFIGURATIONS Debug)
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_CLEAN_FILES "${CMAKE_CURRENT_LIST_DIR}/logs")

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_CXX_VISIBILITY_PRESET hidden)
Expand Down
10 changes: 5 additions & 5 deletions modules/foleys_gui_magic/Widgets/foleys_XYDragComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,16 @@ void XYDragComponent::mouseDown (const juce::MouseEvent& event)
menu.showMenuAsync (juce::PopupMenu::Options()
.withTargetComponent (this)
.withTargetScreenArea ({event.getScreenX(), event.getScreenY(), 1, 1}),
[=](int selected)
[cmp = contextMenuParameter](int selected)
{
if (selected <= 0)
return;

const auto& range = contextMenuParameter->getNormalisableRange();
const auto& range = cmp->getNormalisableRange();
auto value = range.start + (selected-1) * range.interval;
contextMenuParameter->beginChangeGesture();
contextMenuParameter->setValueNotifyingHost (contextMenuParameter->convertTo0to1 (value));
contextMenuParameter->endChangeGesture();
cmp->beginChangeGesture();
cmp->setValueNotifyingHost (cmp->convertTo0to1 (value));
cmp->endChangeGesture();
});

return;
Expand Down

0 comments on commit 4d9513a

Please sign in to comment.