diff options
| author | a1xd <[email protected]> | 2020-09-28 10:02:04 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2020-09-28 10:02:04 -0400 |
| commit | 0d663cd6729160c610e3c6374f71097f8bb2af8b (patch) | |
| tree | 92566357b0c0548d842c56287752d238dcdac805 /common | |
| parent | update build config (diff) | |
| download | rawaccel-0d663cd6729160c610e3c6374f71097f8bb2af8b.tar.xz rawaccel-0d663cd6729160c610e3c6374f71097f8bb2af8b.zip | |
disallow negative weight with non-additive types
Diffstat (limited to 'common')
| -rw-r--r-- | common/accel-base.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/accel-base.hpp b/common/accel-base.hpp index 5106268..67a1b8f 100644 --- a/common/accel-base.hpp +++ b/common/accel-base.hpp @@ -48,7 +48,7 @@ namespace rawaccel { struct nonadditive_accel : accel_val_base<Func> { nonadditive_accel(const accel_args& args) : accel_val_base(args) { - if (args.weight != 0) weight = args.weight; + if (args.weight > 0) weight = args.weight; } inline double operator()(double speed) const { |