mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Fix warnings
This commit is contained in:
parent
4a3d019f06
commit
40d8819e77
|
|
@ -45,6 +45,8 @@ bool MacroActionScreenshot::PerformAction()
|
|||
case MacroActionScreenshot::TargetType::SCENE:
|
||||
source = _scene.GetScene(false);
|
||||
break;
|
||||
case MacroActionScreenshot::TargetType::MAIN_OUTPUT:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (_saveType) {
|
||||
|
|
@ -73,8 +75,7 @@ void MacroActionScreenshot::LogAction() const
|
|||
_scene.ToString(true).c_str());
|
||||
break;
|
||||
case MacroActionScreenshot::TargetType::MAIN_OUTPUT:
|
||||
vblog(LOG_INFO, "trigger screenshot of main output",
|
||||
_scene.ToString(true).c_str());
|
||||
vblog(LOG_INFO, "trigger screenshot of main output");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,11 +152,11 @@ void MacroActionVariable::SetSegmentIndexValue(int value)
|
|||
|
||||
std::shared_ptr<MacroSegment> segment;
|
||||
if (_type == Type::SET_CONDITION_VALUE) {
|
||||
if (value < m->Conditions().size()) {
|
||||
if (value < (int)m->Conditions().size()) {
|
||||
segment = m->Conditions().at(value);
|
||||
}
|
||||
} else if (_type == Type::SET_ACTION_VALUE) {
|
||||
if (value < m->Actions().size()) {
|
||||
if (value < (int)m->Actions().size()) {
|
||||
segment = m->Actions().at(value);
|
||||
}
|
||||
}
|
||||
|
|
@ -399,13 +399,13 @@ void MacroActionVariableEdit::UpdateSegmentVariableValue()
|
|||
std::shared_ptr<MacroSegment> segment;
|
||||
if (_entryData->_type == MacroActionVariable::Type::SET_ACTION_VALUE) {
|
||||
const auto &actions = m->Actions();
|
||||
if (index < actions.size()) {
|
||||
if (index < (int)actions.size()) {
|
||||
segment = actions.at(index);
|
||||
}
|
||||
} else if (_entryData->_type ==
|
||||
MacroActionVariable::Type::SET_CONDITION_VALUE) {
|
||||
const auto &conditions = m->Conditions();
|
||||
if (index < conditions.size()) {
|
||||
if (index < (int)conditions.size()) {
|
||||
segment = conditions.at(index);
|
||||
}
|
||||
}
|
||||
|
|
@ -472,14 +472,14 @@ void MacroActionVariableEdit::MarkSelectedSegment()
|
|||
|
||||
if (_entryData->_type == MacroActionVariable::Type::SET_ACTION_VALUE) {
|
||||
const auto &actions = m->Actions();
|
||||
if (index >= actions.size()) {
|
||||
if (index >= (int)actions.size()) {
|
||||
return;
|
||||
}
|
||||
AdvSceneSwitcher::window->HighlightAction(
|
||||
index, QColor(Qt::lightGray));
|
||||
} else {
|
||||
const auto &conditions = m->Conditions();
|
||||
if (index >= conditions.size()) {
|
||||
if (index >= (int)conditions.size()) {
|
||||
return;
|
||||
}
|
||||
AdvSceneSwitcher::window->HighlightCondition(
|
||||
|
|
|
|||
|
|
@ -79,8 +79,8 @@ protected:
|
|||
VariableSelection *_variables2;
|
||||
QComboBox *_actions;
|
||||
ResizingPlainTextEdit *_strValue;
|
||||
QSpinBox *_segmentIdx;
|
||||
QDoubleSpinBox *_numValue;
|
||||
QSpinBox *_segmentIdx;
|
||||
QLabel *_segmentValueStatus;
|
||||
ResizingPlainTextEdit *_segmentValue;
|
||||
std::shared_ptr<MacroActionVariable> _entryData;
|
||||
|
|
|
|||
|
|
@ -401,9 +401,9 @@ static void populateSourceTypes(QComboBox *list)
|
|||
MacroConditionMediaEdit::MacroConditionMediaEdit(
|
||||
QWidget *parent, std::shared_ptr<MacroConditionMedia> entryData)
|
||||
: QWidget(parent),
|
||||
_sourceTypes(new QComboBox()),
|
||||
_scenes(new SceneSelectionWidget(window(), true, true, true, true,
|
||||
true)),
|
||||
_sourceTypes(new QComboBox()),
|
||||
_sources(new SourceSelectionWidget(this, QStringList(), true)),
|
||||
_states(new QComboBox()),
|
||||
_timeRestrictions(new QComboBox()),
|
||||
|
|
|
|||
|
|
@ -96,6 +96,10 @@ bool MacroConditionVariable::CompareVariables()
|
|||
return validNumbers && val1 < val2;
|
||||
case MacroConditionVariable::Type::GREATER_THAN_VARIABLE:
|
||||
return validNumbers && val1 > val2;
|
||||
default:
|
||||
blog(LOG_WARNING,
|
||||
"Unexpected call of %s with condition type %d", __func__,
|
||||
static_cast<int>(_type));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <QScrollBar>
|
||||
|
||||
MacroSegment::MacroSegment(Macro *m, bool supportsVariableValue)
|
||||
: _supportsVariableValue(supportsVariableValue), _macro(m)
|
||||
: _macro(m), _supportsVariableValue(supportsVariableValue)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user