light refactoring: forbid modification of SoftSparkLimiter::allowHardCut field (#6566)
This commit is contained in:
parent
d87d84138f
commit
eda1a54047
|
@ -158,8 +158,8 @@ bool LaunchControlBase::isLaunchFuelRpmRetardCondition() const {
|
|||
return isLaunchRpmRetardCondition() && engineConfiguration->launchFuelCutEnable;
|
||||
}
|
||||
|
||||
SoftSparkLimiter::SoftSparkLimiter(bool p_allowHardCut) {
|
||||
this->allowHardCut = p_allowHardCut;
|
||||
SoftSparkLimiter::SoftSparkLimiter(const bool p_allowHardCut)
|
||||
: allowHardCut(p_allowHardCut) {
|
||||
#if EFI_UNIT_TEST
|
||||
initLaunchControl();
|
||||
#endif // EFI_UNIT_TEST
|
||||
|
|
|
@ -46,7 +46,7 @@ private:
|
|||
*/
|
||||
class SoftSparkLimiter {
|
||||
public:
|
||||
SoftSparkLimiter(bool allowHardCut);
|
||||
SoftSparkLimiter(bool p_allowHardCut);
|
||||
/**
|
||||
* targetSkipRatio of '0' means 'do not skip', would always return false
|
||||
*/
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
|
||||
bool shouldSkip();
|
||||
private:
|
||||
bool allowHardCut;
|
||||
const bool allowHardCut;
|
||||
bool wasJustSkipped = false;
|
||||
float targetSkipRatio = 0;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue