mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-29 02:03:03 +08:00
UI: Avoid copies in Volume Control
This commit is contained in:
+11
-11
@@ -112,7 +112,7 @@ void VolControl::setPeakMeterType(enum obs_peak_meter_type peakMeterType)
|
||||
}
|
||||
|
||||
VolControl::VolControl(OBSSource source_, bool showConfig)
|
||||
: source (source_),
|
||||
: source (std::move(source_)),
|
||||
levelTotal (0.0f),
|
||||
levelCount (0.0f),
|
||||
obs_fader (obs_fader_create(OBS_FADER_CUBIC)),
|
||||
@@ -227,7 +227,7 @@ QColor VolumeMeter::getBackgroundNominalColor() const
|
||||
|
||||
void VolumeMeter::setBackgroundNominalColor(QColor c)
|
||||
{
|
||||
backgroundNominalColor = c;
|
||||
backgroundNominalColor = std::move(c);
|
||||
}
|
||||
|
||||
QColor VolumeMeter::getBackgroundWarningColor() const
|
||||
@@ -237,7 +237,7 @@ QColor VolumeMeter::getBackgroundWarningColor() const
|
||||
|
||||
void VolumeMeter::setBackgroundWarningColor(QColor c)
|
||||
{
|
||||
backgroundWarningColor = c;
|
||||
backgroundWarningColor = std::move(c);
|
||||
}
|
||||
|
||||
QColor VolumeMeter::getBackgroundErrorColor() const
|
||||
@@ -247,7 +247,7 @@ QColor VolumeMeter::getBackgroundErrorColor() const
|
||||
|
||||
void VolumeMeter::setBackgroundErrorColor(QColor c)
|
||||
{
|
||||
backgroundErrorColor = c;
|
||||
backgroundErrorColor = std::move(c);
|
||||
}
|
||||
|
||||
QColor VolumeMeter::getForegroundNominalColor() const
|
||||
@@ -257,7 +257,7 @@ QColor VolumeMeter::getForegroundNominalColor() const
|
||||
|
||||
void VolumeMeter::setForegroundNominalColor(QColor c)
|
||||
{
|
||||
foregroundNominalColor = c;
|
||||
foregroundNominalColor = std::move(c);
|
||||
}
|
||||
|
||||
QColor VolumeMeter::getForegroundWarningColor() const
|
||||
@@ -267,7 +267,7 @@ QColor VolumeMeter::getForegroundWarningColor() const
|
||||
|
||||
void VolumeMeter::setForegroundWarningColor(QColor c)
|
||||
{
|
||||
foregroundWarningColor = c;
|
||||
foregroundWarningColor = std::move(c);
|
||||
}
|
||||
|
||||
QColor VolumeMeter::getForegroundErrorColor() const
|
||||
@@ -277,7 +277,7 @@ QColor VolumeMeter::getForegroundErrorColor() const
|
||||
|
||||
void VolumeMeter::setForegroundErrorColor(QColor c)
|
||||
{
|
||||
foregroundErrorColor = c;
|
||||
foregroundErrorColor = std::move(c);
|
||||
}
|
||||
|
||||
QColor VolumeMeter::getClipColor() const
|
||||
@@ -287,7 +287,7 @@ QColor VolumeMeter::getClipColor() const
|
||||
|
||||
void VolumeMeter::setClipColor(QColor c)
|
||||
{
|
||||
clipColor = c;
|
||||
clipColor = std::move(c);
|
||||
}
|
||||
|
||||
QColor VolumeMeter::getMagnitudeColor() const
|
||||
@@ -297,7 +297,7 @@ QColor VolumeMeter::getMagnitudeColor() const
|
||||
|
||||
void VolumeMeter::setMagnitudeColor(QColor c)
|
||||
{
|
||||
magnitudeColor = c;
|
||||
magnitudeColor = std::move(c);
|
||||
}
|
||||
|
||||
QColor VolumeMeter::getMajorTickColor() const
|
||||
@@ -307,7 +307,7 @@ QColor VolumeMeter::getMajorTickColor() const
|
||||
|
||||
void VolumeMeter::setMajorTickColor(QColor c)
|
||||
{
|
||||
majorTickColor = c;
|
||||
majorTickColor = std::move(c);
|
||||
}
|
||||
|
||||
QColor VolumeMeter::getMinorTickColor() const
|
||||
@@ -317,7 +317,7 @@ QColor VolumeMeter::getMinorTickColor() const
|
||||
|
||||
void VolumeMeter::setMinorTickColor(QColor c)
|
||||
{
|
||||
minorTickColor = c;
|
||||
minorTickColor = std::move(c);
|
||||
}
|
||||
|
||||
qreal VolumeMeter::getMinimumLevel() const
|
||||
|
||||
Reference in New Issue
Block a user