Skip to content

Commit

Permalink
Update to C++ 20 for gin, and fix formatting issues with the new fmt …
Browse files Browse the repository at this point in the history
…library.
  • Loading branch information
christofmuc committed Nov 10, 2024
1 parent 4d5b002 commit edaa961
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ project(KnobKraft_Orm)
option(ASAN "Use Address Sanitization for Debug version (Windows only for now)" OFF)

# Since we also build MacOS, we need C++ 17. Which is not a bad thing.
set(CMAKE_CXX_STANDARD 17)
# Gin requests C++ 20.
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions(-D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING)

Expand Down
2 changes: 1 addition & 1 deletion The-Orm/PatchListTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ TreeViewNode* PatchListTree::newTreeViewItemForPatchList(midikraft::ListInfo lis
// Add all patches of the dragged list to the target ist
auto loaded_list = db_.getPatchList({ infos["list_id"], infos["list_name"] }, synths_);
if (AlertWindow::showOkCancelBox(AlertWindow::AlertIconType::QuestionIcon, "Add list to list?"
, fmt::format("This will add all {} patches of the list '{}' to the list '{}' at the given position. Continue?", loaded_list->patches().size(), infos["list_name"], list.name
, fmt::format("This will add all {} patches of the list '{}' to the list '{}' at the given position. Continue?", loaded_list->patches().size(), (std::string) infos["list_name"], list.name
))) {
for (auto& patch : loaded_list->patches()) {
db_.addPatchToList(list, patch, insertIndex++);
Expand Down
2 changes: 1 addition & 1 deletion juce-utils
3 changes: 2 additions & 1 deletion synths/kawai-k3/KawaiK3_BCR2000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "KawaiK3WaveParameter.h"

#include <fmt/format.h>
#include "SpdLogJuce.h"

namespace midikraft {

Expand Down Expand Up @@ -140,7 +141,7 @@ namespace midikraft {
" .showvalue on\n"
" .resolution {} {} {} {}\n"
, number_ , paramDef->name()
, (knobkraftChannel + 1) , paramDef->paramNo() , 0 , paramDef->maxValue()
, (knobkraftChannel + 1) , (int)paramDef->paramNo() , 0 , paramDef->maxValue()
//% (channel & 0x0f) % param_
//% paramDef->maxValue()
, 0 , BCRdefinition::ledMode(ledMode_)
Expand Down

0 comments on commit edaa961

Please sign in to comment.