guitarix/guitarix-0.35.0-abs-unsigned-fix.patch

80 lines
4.0 KiB
Diff
Raw Normal View History

2017-02-19 09:54:42 +00:00
diff -Nurp guitarix-0.35.2.orig/src/LV2/gx_amp.lv2/gxamp.cpp guitarix-0.35.2.mod/src/LV2/gx_amp.lv2/gxamp.cpp
--- guitarix-0.35.2.orig/src/LV2/gx_amp.lv2/gxamp.cpp 2016-10-11 10:01:02.000000000 +0200
+++ guitarix-0.35.2.mod/src/LV2/gx_amp.lv2/gxamp.cpp 2017-02-19 00:17:58.519635549 +0100
@@ -235,19 +235,19 @@ private:
volatile int32_t schedule_wait;
2017-02-01 02:40:41 +00:00
inline bool cab_changed()
2017-02-19 09:54:42 +00:00
- {return abs(cab - clevel_ ) > 0.1;}
+ {return std::abs(cab - clevel_ ) > 0.1;}
2017-02-01 02:40:41 +00:00
inline bool buffsize_changed()
- {return abs(bufsize - cur_bufsize) != 0;}
+ {return bufsize != cur_bufsize;}
inline void update_cab()
2017-02-19 09:54:42 +00:00
{cab = clevel_ ; c_old_model_ = c_model_;}
2017-02-01 02:40:41 +00:00
inline bool change_cab()
2017-02-19 09:54:42 +00:00
- {return abs(c_old_model_ - c_model_) > 0.1;}
+ {return std::abs(c_old_model_ - c_model_) > 0.1;}
inline bool pre_changed()
- {return abs(pre - alevel_) > 0.1;}
+ {return std::abs(pre - alevel_) > 0.1;}
inline void update_pre()
{pre = (alevel_);}
inline bool val_changed()
- {return abs(alevel_ - (*alevel)) > 0.1 || abs(clevel_ - (*clevel)) > 0.1 || abs(c_model_ - (*c_model)) > 0.1;}
+ {return std::abs(alevel_ - (*alevel)) > 0.1 || std::abs(clevel_ - (*clevel)) > 0.1 || std::abs(c_model_ - (*c_model)) > 0.1;}
// LV2 stuff
LV2_URID_Map* map;
diff -Nurp guitarix-0.35.2.orig/src/LV2/gx_amp_stereo.lv2/gxamp_stereo.cpp guitarix-0.35.2.mod/src/LV2/gx_amp_stereo.lv2/gxamp_stereo.cpp
--- guitarix-0.35.2.orig/src/LV2/gx_amp_stereo.lv2/gxamp_stereo.cpp 2016-10-11 10:01:02.000000000 +0200
+++ guitarix-0.35.2.mod/src/LV2/gx_amp_stereo.lv2/gxamp_stereo.cpp 2017-02-19 00:18:20.624972976 +0100
@@ -235,19 +235,19 @@ private:
volatile int32_t schedule_wait;
2017-02-01 02:40:41 +00:00
bool cab_changed()
2017-02-19 09:54:42 +00:00
- {return abs(cab - clevel_ ) > 0.1;}
+ {return std::abs(cab - clevel_ ) > 0.1;}
2017-02-01 02:40:41 +00:00
bool buffsize_changed()
- {return abs(bufsize - cur_bufsize) != 0;}
+ {return bufsize != cur_bufsize;}
void update_cab()
2017-02-19 09:54:42 +00:00
{cab = (clevel_ ); c_old_model_ = c_model_;}
2017-02-01 02:40:41 +00:00
bool change_cab()
2017-02-19 09:54:42 +00:00
- {return abs(c_old_model_ - c_model_) > 0.1;}
+ {return std::abs(c_old_model_ - c_model_) > 0.1;}
bool pre_changed()
- {return abs(pre - alevel_) > 0.1;}
+ {return std::abs(pre - alevel_) > 0.1;}
void update_pre()
{pre = (alevel_);}
inline bool val_changed()
- {return abs(alevel_ - (*alevel)) > 0.1 || abs(clevel_ - (*clevel)) > 0.1 || abs(c_model_ - (*c_model)) > 0.1;}
+ {return std::abs(alevel_ - (*alevel)) > 0.1 || std::abs(clevel_ - (*clevel)) > 0.1 || std::abs(c_model_ - (*c_model)) > 0.1;}
// LV2 stuff
LV2_URID_Map* map;
diff -Nurp guitarix-0.35.2.orig/src/LV2/gx_cabinet.lv2/gxcabinet.cpp guitarix-0.35.2.mod/src/LV2/gx_cabinet.lv2/gxcabinet.cpp
--- guitarix-0.35.2.orig/src/LV2/gx_cabinet.lv2/gxcabinet.cpp 2016-10-11 10:01:02.000000000 +0200
+++ guitarix-0.35.2.mod/src/LV2/gx_cabinet.lv2/gxcabinet.cpp 2017-02-19 00:17:18.791826329 +0100
@@ -106,15 +106,15 @@ private:
volatile int32_t schedule_wait;
2017-02-01 02:40:41 +00:00
inline bool cab_changed()
2017-02-19 09:54:42 +00:00
- {return abs(cab_bass - cbass_) > 0.1 || abs(cab_treble - ctreble_) > 0.1 || abs(cab_level - clevel_) > 0.1;}
+ {return std::abs(cab_bass - cbass_) > 0.1 || std::abs(cab_treble - ctreble_) > 0.1 || std::abs(cab_level - clevel_) > 0.1;}
2017-02-01 02:40:41 +00:00
inline bool buffsize_changed()
- {return abs(bufsize - cur_bufsize) != 0;}
+ {return bufsize != cur_bufsize;}
inline void update_cab()
2017-02-19 09:54:42 +00:00
{cab_bass = cbass_; cab_treble = ctreble_; cab_level = clevel_; c_old_model_ = c_model_;}
2017-02-01 02:40:41 +00:00
inline bool change_cab()
2017-02-19 09:54:42 +00:00
- {return abs(c_old_model_ - c_model_) > 0.1;}
+ {return std::abs(c_old_model_ - c_model_) > 0.1;}
inline bool val_changed()
- {return abs(cbass_ - (*cbass)) > 0.1 || abs(ctreble_ != (*ctreble)) > 0.1 || abs(clevel_ != (*clevel)) > 0.1 || abs(c_model_ != (*c_model)) > 0.1;}
+ {return std::abs(cbass_ - (*cbass)) > 0.1 || std::abs(ctreble_ != (*ctreble)) > 0.1 || std::abs(clevel_ != (*clevel)) > 0.1 || std::abs(c_model_ != (*c_model)) > 0.1;}
// LV2 stuff
LV2_URID_Map* map;