Advertisement
Guest User

Untitled

a guest
Jul 27th, 2020
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 13.42 KB | None | 0 0
  1. diff --git a/src/lib/api.cc b/src/lib/api.cc
  2. index 62ec8d2..1a0edb8 100644
  3. --- a/src/lib/api.cc
  4. +++ b/src/lib/api.cc
  5. @@ -1686 +1686 @@ void fomus_run(FOMUS f) {
  6. -       i = find_if(mods.begin(), mods.end(), bind(&modbase::modout_hasext, boost::lambda::_1, boost::lambda::constant_ref(boost::to_lower_copy(ii))));
  7. +       i = find_if(mods.begin(), mods.end(), bind(&modbase::modout_hasext, std::placeholders::_1, boost::to_lower_copy(ii)));
  8. diff --git a/src/lib/data.cc b/src/lib/data.cc
  9. index b2161e1..04dc941 100644
  10. --- a/src/lib/data.cc
  11. +++ b/src/lib/data.cc
  12. @@ -347 +347,2 @@ namespace fomus {
  13. -      out << std::fixed << std::setprecision(3) << val;
  14. +      out.setf(std::ios_base::fixed, std::ios_base::floatfield);
  15. +      out << std::setprecision(3) << val;
  16. diff --git a/src/lib/heads.h b/src/lib/heads.h
  17. index 3a3d513..d7eacd8 100644
  18. --- a/src/lib/heads.h
  19. +++ b/src/lib/heads.h
  20. @@ -90 +90 @@
  21. -#include <boost/math/common_factor.hpp>
  22. +#include <boost/integer/common_factor.hpp>
  23. diff --git a/src/lib/instrs.cc b/src/lib/instrs.cc
  24. index 66c6989..c4cddf2 100644
  25. --- a/src/lib/instrs.cc
  26. +++ b/src/lib/instrs.cc
  27. @@ -86 +86 @@ namespace fomus {
  28. -      for (setmap_constit i(next(sets.begin())); i != sets.end(); ++i) {
  29. +      for (setmap_constit i(std::next(sets.begin())); i != sets.end(); ++i) {
  30. diff --git a/src/lib/mod/octs/octs.cc b/src/lib/mod/octs/octs.cc
  31. index ab47145..6aa9af0 100644
  32. --- a/src/lib/mod/octs/octs.cc
  33. +++ b/src/lib/mod/octs/octs.cc
  34. @@ -125 +125 @@ namespace octs {
  35. -   for (std::vector<scorenode>::const_iterator i(arr.begin()), ie(boost::prior(arr.end())); i != arr.end(); ++i) {
  36. +   for (std::vector<scorenode>::const_iterator i(arr.begin()), ie(std::prev(arr.end())); i != arr.end(); ++i) {
  37. @@ -128,2 +128,2 @@ namespace octs {
  38. -     assert(octchange(i, (i == ie ? n2 : *boost::next(i)->node), n2) >= 0);
  39. -     mx += octchange(i, (i == ie ? n2 : *boost::next(i)->node), n2) * i->dist;
  40. +     assert(octchange(i, (i == ie ? n2 : *std::next(i)->node), n2) >= 0);
  41. +     mx += octchange(i, (i == ie ? n2 : *std::next(i)->node), n2) * i->dist;
  42. diff --git a/src/lib/mod/quant/grtquant.cc b/src/lib/mod/quant/grtquant.cc
  43. index 67aeb66..b3a0d51 100644
  44. --- a/src/lib/mod/quant/grtquant.cc
  45. +++ b/src/lib/mod/quant/grtquant.cc
  46. @@ -108 +108 @@ namespace grtquant {
  47. -    for (std::vector<holder>::iterator c(be), i(boost::next(be)); i < en; ++i) { // loop through all, group into chords & set to same durs
  48. +    for (std::vector<holder>::iterator c(be), i(std::next(be)); i < en; ++i) { // loop through all, group into chords & set to same durs
  49. @@ -120 +120 @@ namespace grtquant {
  50. -      for (std::vector<holder>::iterator i(mi), l(boost::prior(en)); ; ++i) { // 0 and after
  51. +      for (std::vector<holder>::iterator i(mi), l(std::prev(en)); ; ++i) { // 0 and after
  52. @@ -124 +124 @@ namespace grtquant {
  53. -   if (!isolap(*boost::next(i), o1, o2, i->dur)) {cur = cur + i->dur;}
  54. +   if (!isolap(*std::next(i), o1, o2, i->dur)) {cur = cur + i->dur;}
  55. @@ -129 +129 @@ namespace grtquant {
  56. -      for (std::vector<holder>::iterator i(boost::prior(mi)); ; --i) { // before 0
  57. +      for (std::vector<holder>::iterator i(std::prev(mi)); ; --i) { // before 0
  58. @@ -133 +133 @@ namespace grtquant {
  59. -   if (!isolap(*boost::prior(i), o1, o2, i->dur)) {cur = cur - i->dur;}
  60. +   if (!isolap(*std::prev(i), o1, o2, i->dur)) {cur = cur - i->dur;}
  61. diff --git a/src/lib/mods.h b/src/lib/mods.h
  62. index 6597965..fcbb7df 100644
  63. --- a/src/lib/mods.h
  64. +++ b/src/lib/mods.h
  65. @@ -217 +217 @@ namespace fomus {
  66. -    void* getdata(FOMUS f) const {return initerrwrap(T::newdata(f));}
  67. +    void* getdata(FOMUS f) const {return this->initerrwrap(T::newdata(f));}
  68. diff --git a/src/lib/moremath.h b/src/lib/moremath.h
  69. index afc2c32..4178f7e 100644
  70. --- a/src/lib/moremath.h
  71. +++ b/src/lib/moremath.h
  72. @@ -38 +38 @@ namespace fomus {
  73. -    fint m = boost::math::lcm(x.denominator(), y.denominator());
  74. +    fint m = boost::integer::lcm(x.denominator(), y.denominator());
  75. diff --git a/src/lib/numbers.h b/src/lib/numbers.h
  76. index 3d7cc1f..b77a224 100644
  77. --- a/src/lib/numbers.h
  78. +++ b/src/lib/numbers.h
  79. @@ -203 +203,4 @@ namespace FNAMESPACE {
  80. -   ss << std::fixed << std::setprecision(5) << std::showpoint << x.val.f;
  81. +    ss.setf(std::ios_base::fixed, std::ios_base::floatfield);
  82. +    ss << std::setprecision(5);
  83. +    ss.setf(std::ios_base::showpoint);
  84. +    ss << x.val.f;
  85. diff --git a/src/lib/schedr.cc b/src/lib/schedr.cc
  86. index 4f9156d..5810c98 100644
  87. --- a/src/lib/schedr.cc
  88. +++ b/src/lib/schedr.cc
  89. @@ -945,0 +946,6 @@ namespace fomus {
  90. +  const varbase& fom_get_varbase_up(const int id) {return threadfd->get_varbase(id);} // only called from module, so stageobj must be valid
  91. +  fint fom_get_ival_up(const int id) {return threadfd->get_ival(id);}
  92. +  rat fom_get_rval_up(const int id) {return threadfd->get_rval(id);}
  93. +  ffloat fom_get_fval_up(const int id) {return threadfd->get_fval(id);}
  94. +  const std::string& fom_get_sval_up(const int id) {return threadfd->get_sval(id);}
  95. +  const module_value& fom_get_lval_up(const int id) {return threadfd->get_lval(id);}
  96. diff --git a/src/lib/schedr.h b/src/lib/schedr.h
  97. index 12b759a..c01d067 100644
  98. --- a/src/lib/schedr.h
  99. +++ b/src/lib/schedr.h
  100. @@ -256,6 +256,6 @@ namespace fomus {
  101. -  inline const varbase& fom_get_varbase_up(const int id) {return threadfd->get_varbase(id);} // only called from module, so stageobj must be valid
  102. -  inline fint fom_get_ival_up(const int id) {return threadfd->get_ival(id);}
  103. -  inline rat fom_get_rval_up(const int id) {return threadfd->get_rval(id);}
  104. -  inline ffloat fom_get_fval_up(const int id) {return threadfd->get_fval(id);}
  105. -  inline const std::string& fom_get_sval_up(const int id) {return threadfd->get_sval(id);}
  106. -  inline const module_value& fom_get_lval_up(const int id) {return threadfd->get_lval(id);}
  107. +  const varbase& fom_get_varbase_up(const int id); // only called from module, so stageobj must be valid
  108. +  fint fom_get_ival_up(const int id);
  109. +  rat fom_get_rval_up(const int id);
  110. +  ffloat fom_get_fval_up(const int id);
  111. +  const std::string& fom_get_sval_up(const int id);
  112. +  const module_value& fom_get_lval_up(const int id);
  113. diff --git a/src/lib/util.cc b/src/lib/util.cc
  114. index 6b7dd06..e5c8f51 100644
  115. --- a/src/lib/util.cc
  116. +++ b/src/lib/util.cc
  117. @@ -115 +115 @@ fomus_rat mod_rat(fomus_rat x, fomus_rat y) {
  118. -  fomus_int m = boost::math::lcm(x.den, y.den);
  119. +  fomus_int m = boost::integer::lcm(x.den, y.den);
  120. diff --git a/src/lib/vars.cc b/src/lib/vars.cc
  121. index 7147cee..c98e5f7 100644
  122. --- a/src/lib/vars.cc
  123. +++ b/src/lib/vars.cc
  124. @@ -100 +100 @@ namespace fomus {
  125. -      for (globpercsvarvect_constit i(next(map.begin())); i != map.end(); ++i) {
  126. +      for (globpercsvarvect_constit i(std::next(map.begin())); i != map.end(); ++i) {
  127. @@ -133 +133 @@ namespace fomus {
  128. -      for (globinstsvarvect_constit i(next(map.begin())); i != map.end(); ++i) {
  129. +      for (globinstsvarvect_constit i(std::next(map.begin())); i != map.end(); ++i) {
  130. @@ -325 +325 @@ namespace fomus {
  131. -      el.insert(listelmap::value_type(i->first, x.release()));
  132. +      el.insert(listelmap::value_type(i->first, listelshptr(x.release())));
  133. @@ -366 +366 @@ namespace fomus {
  134. -      el.insert(listelmap::value_type(i->first, x = new listelvect));
  135. +      el.insert(listelmap::value_type(i->first, listelshptr(x = new listelvect)));
  136. @@ -376,2 +376,2 @@ namespace fomus {
  137. -    el.insert(listelmap::value_type("cmaj", new listelvect(v)));
  138. -    el.insert(listelmap::value_type("amin",  new listelvect(v)));
  139. +    el.insert(listelmap::value_type("cmaj", listelshptr(new listelvect(v))));
  140. +    el.insert(listelmap::value_type("amin",  listelshptr(new listelvect(v))));
  141. @@ -379,2 +379,2 @@ namespace fomus {
  142. -    el.insert(listelmap::value_type("gmaj", new listelvect(v)));
  143. -    el.insert(listelmap::value_type("emin", new listelvect(v)));
  144. +    el.insert(listelmap::value_type("gmaj", listelshptr(new listelvect(v))));
  145. +    el.insert(listelmap::value_type("emin", listelshptr(new listelvect(v))));
  146. @@ -382,2 +382,2 @@ namespace fomus {
  147. -    el.insert(listelmap::value_type("dmaj", new listelvect(v)));
  148. -    el.insert(listelmap::value_type("bmin", new listelvect(v)));
  149. +    el.insert(listelmap::value_type("dmaj", listelshptr(new listelvect(v))));
  150. +    el.insert(listelmap::value_type("bmin", listelshptr(new listelvect(v))));
  151. @@ -385,2 +385,2 @@ namespace fomus {
  152. -    el.insert(listelmap::value_type("amaj", new listelvect(v)));
  153. -    el.insert(listelmap::value_type("f+min", new listelvect(v)));
  154. +    el.insert(listelmap::value_type("amaj", listelshptr(new listelvect(v))));
  155. +    el.insert(listelmap::value_type("f+min", listelshptr(new listelvect(v))));
  156. @@ -388,2 +388,2 @@ namespace fomus {
  157. -    el.insert(listelmap::value_type("emaj", new listelvect(v)));
  158. -    el.insert(listelmap::value_type("c+min", new listelvect(v)));
  159. +    el.insert(listelmap::value_type("emaj", listelshptr(new listelvect(v))));
  160. +    el.insert(listelmap::value_type("c+min", listelshptr(new listelvect(v))));
  161. @@ -391,2 +391,2 @@ namespace fomus {
  162. -    el.insert(listelmap::value_type("bmaj", new listelvect(v)));
  163. -    el.insert(listelmap::value_type("g+min", new listelvect(v)));
  164. +    el.insert(listelmap::value_type("bmaj", listelshptr(new listelvect(v))));
  165. +    el.insert(listelmap::value_type("g+min", listelshptr(new listelvect(v))));
  166. @@ -394,2 +394,2 @@ namespace fomus {
  167. -    el.insert(listelmap::value_type("f+maj", new listelvect(v)));
  168. -    el.insert(listelmap::value_type("d+min", new listelvect(v)));
  169. +    el.insert(listelmap::value_type("f+maj", listelshptr(new listelvect(v))));
  170. +    el.insert(listelmap::value_type("d+min", listelshptr(new listelvect(v))));
  171. @@ -397,2 +397,2 @@ namespace fomus {
  172. -    el.insert(listelmap::value_type("c+maj", new listelvect(v)));
  173. -    el.insert(listelmap::value_type("a+min", new listelvect(v)));
  174. +    el.insert(listelmap::value_type("c+maj", listelshptr(new listelvect(v))));
  175. +    el.insert(listelmap::value_type("a+min", listelshptr(new listelvect(v))));
  176. @@ -400,2 +400,2 @@ namespace fomus {
  177. -    el.insert(listelmap::value_type("fmaj", new listelvect(v)));
  178. -    el.insert(listelmap::value_type("dmin", new listelvect(v)));
  179. +    el.insert(listelmap::value_type("fmaj", listelshptr(new listelvect(v))));
  180. +    el.insert(listelmap::value_type("dmin", listelshptr(new listelvect(v))));
  181. @@ -403,2 +403,2 @@ namespace fomus {
  182. -    el.insert(listelmap::value_type("b-maj", new listelvect(v)));
  183. -    el.insert(listelmap::value_type("gmin", new listelvect(v)));
  184. +    el.insert(listelmap::value_type("b-maj", listelshptr(new listelvect(v))));
  185. +    el.insert(listelmap::value_type("gmin", listelshptr(new listelvect(v))));
  186. @@ -406,2 +406,2 @@ namespace fomus {
  187. -    el.insert(listelmap::value_type("e-maj", new listelvect(v)));
  188. -    el.insert(listelmap::value_type("cmin", new listelvect(v)));
  189. +    el.insert(listelmap::value_type("e-maj", listelshptr(new listelvect(v))));
  190. +    el.insert(listelmap::value_type("cmin", listelshptr(new listelvect(v))));
  191. @@ -409,2 +409,2 @@ namespace fomus {
  192. -    el.insert(listelmap::value_type("a-maj", new listelvect(v)));
  193. -    el.insert(listelmap::value_type("fmin", new listelvect(v)));
  194. +    el.insert(listelmap::value_type("a-maj", listelshptr(new listelvect(v))));
  195. +    el.insert(listelmap::value_type("fmin", listelshptr(new listelvect(v))));
  196. @@ -412,2 +412,2 @@ namespace fomus {
  197. -    el.insert(listelmap::value_type("d-maj", new listelvect(v)));
  198. -    el.insert(listelmap::value_type("b-min", new listelvect(v)));
  199. +    el.insert(listelmap::value_type("d-maj", listelshptr(new listelvect(v))));
  200. +    el.insert(listelmap::value_type("b-min", listelshptr(new listelvect(v))));
  201. @@ -415,2 +415,2 @@ namespace fomus {
  202. -    el.insert(listelmap::value_type("g-maj", new listelvect(v)));
  203. -    el.insert(listelmap::value_type("e-min", new listelvect(v)));
  204. +    el.insert(listelmap::value_type("g-maj", listelshptr(new listelvect(v))));
  205. +    el.insert(listelmap::value_type("e-min", listelshptr(new listelvect(v))));
  206. @@ -418,2 +418,2 @@ namespace fomus {
  207. -    el.insert(listelmap::value_type("c-maj", new listelvect(v)));
  208. -    el.insert(listelmap::value_type("a-min", new listelvect(v)));
  209. +    el.insert(listelmap::value_type("c-maj", listelshptr(new listelvect(v))));
  210. +    el.insert(listelmap::value_type("a-min", listelshptr(new listelvect(v))));
  211. @@ -461 +461 @@ namespace fomus {
  212. -      rat i(miv.isnull() ? std::numeric_limits<fint>::min() + 1 : numtorat(miv));
  213. +      rat i2(miv.isnull() ? std::numeric_limits<fint>::min() + 1 : numtorat(miv));
  214. @@ -463 +463 @@ namespace fomus {
  215. -      user.push_back(new userkeysigent(m, a, i, o));
  216. +      user.push_back(new userkeysigent(m, a, i2, o));
  217. @@ -466 +466 @@ namespace fomus {
  218. -      if (i.numerator() == std::numeric_limits<fint>::min() + 1) i = 0; // must have at least these two things
  219. +      if (i2.numerator() == std::numeric_limits<fint>::min() + 1) i2 = 0; // must have at least these two things
  220. @@ -471 +471 @@ namespace fomus {
  221. -   sig[todiatonic(x0.numerator())] = std::pair<rat, rat>(a, i);
  222. +   sig[todiatonic(x0.numerator())] = std::pair<rat, rat>(a, i2);
  223. @@ -474 +474 @@ namespace fomus {
  224. -   for (int x = todiatonic(m.numerator()) % 7; x < 75; x += 7) sig[x] = std::pair<rat, rat>(a, i);
  225. +   for (int x = todiatonic(m.numerator()) % 7; x < 75; x += 7) sig[x] = std::pair<rat, rat>(a, i2);
  226. diff --git a/src/lib/vars.h b/src/lib/vars.h
  227. index 31938f9..64beba4 100644
  228. --- a/src/lib/vars.h
  229. +++ b/src/lib/vars.h
  230. @@ -459 +459,2 @@ namespace fomus {
  231. -      s << std::fixed << std::setprecision(3) << val;
  232. +      s.setf(std::ios_base::fixed, std::ios_base::floatfield);
  233. +      s << std::setprecision(3) << val;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement