mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
CapabilityInquiryDemo: Fix potential C++23 comparison warning
This commit is contained in:
parent
392442906e
commit
e6d6ba6984
1 changed files with 7 additions and 4 deletions
|
|
@ -2650,8 +2650,9 @@ private:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constexpr auto isEditable = editable == Editable::yes;
|
||||||
const auto canSetFull = item->canSet != Model::CanSet::none
|
const auto canSetFull = item->canSet != Model::CanSet::none
|
||||||
|| editable == Editable::yes;
|
|| isEditable;
|
||||||
setFull.setEnabled (canSetFull);
|
setFull.setEnabled (canSetFull);
|
||||||
setPartial.setEnabled (item->canSet == Model::CanSet::partial);
|
setPartial.setEnabled (item->canSet == Model::CanSet::partial);
|
||||||
get.setEnabled (item->canGet);
|
get.setEnabled (item->canGet);
|
||||||
|
|
@ -2704,7 +2705,9 @@ public:
|
||||||
explicit PropertyInfoPanel (State<Model::Properties> s)
|
explicit PropertyInfoPanel (State<Model::Properties> s)
|
||||||
: state (s)
|
: state (s)
|
||||||
{
|
{
|
||||||
if constexpr (editable == Editable::yes)
|
constexpr auto isEditable = editable == Editable::yes;
|
||||||
|
|
||||||
|
if constexpr (isEditable)
|
||||||
{
|
{
|
||||||
|
|
||||||
addAndMakeVisible (canSet);
|
addAndMakeVisible (canSet);
|
||||||
|
|
@ -2719,7 +2722,7 @@ public:
|
||||||
[&] (auto&&... args)
|
[&] (auto&&... args)
|
||||||
{
|
{
|
||||||
(addAndMakeVisible (args), ...);
|
(addAndMakeVisible (args), ...);
|
||||||
(args.setClickingTogglesState (editable == Editable::yes), ...);
|
(args.setClickingTogglesState (isEditable), ...);
|
||||||
((args.onClick = [this] { updateStateFromUI(); }), ...);
|
((args.onClick = [this] { updateStateFromUI(); }), ...);
|
||||||
} (canGet,
|
} (canGet,
|
||||||
canSubscribe,
|
canSubscribe,
|
||||||
|
|
@ -2737,7 +2740,7 @@ public:
|
||||||
[&] (auto&&... args)
|
[&] (auto&&... args)
|
||||||
{
|
{
|
||||||
(addAndMakeVisible (args), ...);
|
(addAndMakeVisible (args), ...);
|
||||||
(args.setReadOnly (editable == Editable::no), ...);
|
(args.setReadOnly (! isEditable), ...);
|
||||||
(args.setMultiLine (true), ...);
|
(args.setMultiLine (true), ...);
|
||||||
((args.onReturnKey = args.onEscapeKey
|
((args.onReturnKey = args.onEscapeKey
|
||||||
= args.onFocusLost
|
= args.onFocusLost
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue