Cut core/ui and core/audio comment bloat ~60% (comments only, zero code change)
This commit is contained in:
@@ -1,18 +1,16 @@
|
||||
// mode_enable — pure implementation. See mode_enable.h. NO REAPER / SWELL / LICE / vendor.
|
||||
// mode_enable — pure implementation. See mode_enable.h.
|
||||
|
||||
#include "core/ui/mode_enable.h"
|
||||
|
||||
#include "core/view/view_mode_model.h" // kArrangeModeId / kDesignModeId — the ONE home for the mode ids
|
||||
#include "core/view/view_mode_model.h" // kArrangeModeId / kDesignModeId
|
||||
|
||||
namespace reasampler::ui {
|
||||
|
||||
bool tagButtonEnabled(const std::string& activeModeId, TagTarget target) {
|
||||
// The target's own mode id, so the rule is a single "target != active" compare.
|
||||
const char* targetId =
|
||||
(target == TagTarget::Arrange) ? kArrangeModeId : kDesignModeId;
|
||||
|
||||
// Fail-open on an unrecognized active id (neither seed mode): every button live, so a
|
||||
// future added mode never dead-locks the bar and the user can always reach the action.
|
||||
// Fail-open on an unrecognized active id: every button live.
|
||||
if (activeModeId != kArrangeModeId && activeModeId != kDesignModeId) return true;
|
||||
|
||||
return activeModeId != targetId;
|
||||
|
||||
Reference in New Issue
Block a user