Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/lib/api.cc b/src/lib/api.cc
- index 62ec8d2..1a0edb8 100644
- --- a/src/lib/api.cc
- +++ b/src/lib/api.cc
- @@ -1686 +1686 @@ void fomus_run(FOMUS f) {
- - i = find_if(mods.begin(), mods.end(), bind(&modbase::modout_hasext, boost::lambda::_1, boost::lambda::constant_ref(boost::to_lower_copy(ii))));
- + i = find_if(mods.begin(), mods.end(), bind(&modbase::modout_hasext, std::placeholders::_1, boost::to_lower_copy(ii)));
- diff --git a/src/lib/data.cc b/src/lib/data.cc
- index b2161e1..04dc941 100644
- --- a/src/lib/data.cc
- +++ b/src/lib/data.cc
- @@ -347 +347,2 @@ namespace fomus {
- - out << std::fixed << std::setprecision(3) << val;
- + out.setf(std::ios_base::fixed, std::ios_base::floatfield);
- + out << std::setprecision(3) << val;
- diff --git a/src/lib/heads.h b/src/lib/heads.h
- index 3a3d513..d7eacd8 100644
- --- a/src/lib/heads.h
- +++ b/src/lib/heads.h
- @@ -90 +90 @@
- -#include <boost/math/common_factor.hpp>
- +#include <boost/integer/common_factor.hpp>
- diff --git a/src/lib/instrs.cc b/src/lib/instrs.cc
- index 66c6989..c4cddf2 100644
- --- a/src/lib/instrs.cc
- +++ b/src/lib/instrs.cc
- @@ -86 +86 @@ namespace fomus {
- - for (setmap_constit i(next(sets.begin())); i != sets.end(); ++i) {
- + for (setmap_constit i(std::next(sets.begin())); i != sets.end(); ++i) {
- diff --git a/src/lib/mod/octs/octs.cc b/src/lib/mod/octs/octs.cc
- index ab47145..6aa9af0 100644
- --- a/src/lib/mod/octs/octs.cc
- +++ b/src/lib/mod/octs/octs.cc
- @@ -125 +125 @@ namespace octs {
- - for (std::vector<scorenode>::const_iterator i(arr.begin()), ie(boost::prior(arr.end())); i != arr.end(); ++i) {
- + for (std::vector<scorenode>::const_iterator i(arr.begin()), ie(std::prev(arr.end())); i != arr.end(); ++i) {
- @@ -128,2 +128,2 @@ namespace octs {
- - assert(octchange(i, (i == ie ? n2 : *boost::next(i)->node), n2) >= 0);
- - mx += octchange(i, (i == ie ? n2 : *boost::next(i)->node), n2) * i->dist;
- + assert(octchange(i, (i == ie ? n2 : *std::next(i)->node), n2) >= 0);
- + mx += octchange(i, (i == ie ? n2 : *std::next(i)->node), n2) * i->dist;
- diff --git a/src/lib/mod/quant/grtquant.cc b/src/lib/mod/quant/grtquant.cc
- index 67aeb66..b3a0d51 100644
- --- a/src/lib/mod/quant/grtquant.cc
- +++ b/src/lib/mod/quant/grtquant.cc
- @@ -108 +108 @@ namespace grtquant {
- - for (std::vector<holder>::iterator c(be), i(boost::next(be)); i < en; ++i) { // loop through all, group into chords & set to same durs
- + for (std::vector<holder>::iterator c(be), i(std::next(be)); i < en; ++i) { // loop through all, group into chords & set to same durs
- @@ -120 +120 @@ namespace grtquant {
- - for (std::vector<holder>::iterator i(mi), l(boost::prior(en)); ; ++i) { // 0 and after
- + for (std::vector<holder>::iterator i(mi), l(std::prev(en)); ; ++i) { // 0 and after
- @@ -124 +124 @@ namespace grtquant {
- - if (!isolap(*boost::next(i), o1, o2, i->dur)) {cur = cur + i->dur;}
- + if (!isolap(*std::next(i), o1, o2, i->dur)) {cur = cur + i->dur;}
- @@ -129 +129 @@ namespace grtquant {
- - for (std::vector<holder>::iterator i(boost::prior(mi)); ; --i) { // before 0
- + for (std::vector<holder>::iterator i(std::prev(mi)); ; --i) { // before 0
- @@ -133 +133 @@ namespace grtquant {
- - if (!isolap(*boost::prior(i), o1, o2, i->dur)) {cur = cur - i->dur;}
- + if (!isolap(*std::prev(i), o1, o2, i->dur)) {cur = cur - i->dur;}
- diff --git a/src/lib/mods.h b/src/lib/mods.h
- index 6597965..fcbb7df 100644
- --- a/src/lib/mods.h
- +++ b/src/lib/mods.h
- @@ -217 +217 @@ namespace fomus {
- - void* getdata(FOMUS f) const {return initerrwrap(T::newdata(f));}
- + void* getdata(FOMUS f) const {return this->initerrwrap(T::newdata(f));}
- diff --git a/src/lib/moremath.h b/src/lib/moremath.h
- index afc2c32..4178f7e 100644
- --- a/src/lib/moremath.h
- +++ b/src/lib/moremath.h
- @@ -38 +38 @@ namespace fomus {
- - fint m = boost::math::lcm(x.denominator(), y.denominator());
- + fint m = boost::integer::lcm(x.denominator(), y.denominator());
- diff --git a/src/lib/numbers.h b/src/lib/numbers.h
- index 3d7cc1f..b77a224 100644
- --- a/src/lib/numbers.h
- +++ b/src/lib/numbers.h
- @@ -203 +203,4 @@ namespace FNAMESPACE {
- - ss << std::fixed << std::setprecision(5) << std::showpoint << x.val.f;
- + ss.setf(std::ios_base::fixed, std::ios_base::floatfield);
- + ss << std::setprecision(5);
- + ss.setf(std::ios_base::showpoint);
- + ss << x.val.f;
- diff --git a/src/lib/schedr.cc b/src/lib/schedr.cc
- index 4f9156d..5810c98 100644
- --- a/src/lib/schedr.cc
- +++ b/src/lib/schedr.cc
- @@ -945,0 +946,6 @@ namespace fomus {
- + const varbase& fom_get_varbase_up(const int id) {return threadfd->get_varbase(id);} // only called from module, so stageobj must be valid
- + fint fom_get_ival_up(const int id) {return threadfd->get_ival(id);}
- + rat fom_get_rval_up(const int id) {return threadfd->get_rval(id);}
- + ffloat fom_get_fval_up(const int id) {return threadfd->get_fval(id);}
- + const std::string& fom_get_sval_up(const int id) {return threadfd->get_sval(id);}
- + const module_value& fom_get_lval_up(const int id) {return threadfd->get_lval(id);}
- diff --git a/src/lib/schedr.h b/src/lib/schedr.h
- index 12b759a..c01d067 100644
- --- a/src/lib/schedr.h
- +++ b/src/lib/schedr.h
- @@ -256,6 +256,6 @@ namespace fomus {
- - inline const varbase& fom_get_varbase_up(const int id) {return threadfd->get_varbase(id);} // only called from module, so stageobj must be valid
- - inline fint fom_get_ival_up(const int id) {return threadfd->get_ival(id);}
- - inline rat fom_get_rval_up(const int id) {return threadfd->get_rval(id);}
- - inline ffloat fom_get_fval_up(const int id) {return threadfd->get_fval(id);}
- - inline const std::string& fom_get_sval_up(const int id) {return threadfd->get_sval(id);}
- - inline const module_value& fom_get_lval_up(const int id) {return threadfd->get_lval(id);}
- + const varbase& fom_get_varbase_up(const int id); // only called from module, so stageobj must be valid
- + fint fom_get_ival_up(const int id);
- + rat fom_get_rval_up(const int id);
- + ffloat fom_get_fval_up(const int id);
- + const std::string& fom_get_sval_up(const int id);
- + const module_value& fom_get_lval_up(const int id);
- diff --git a/src/lib/util.cc b/src/lib/util.cc
- index 6b7dd06..e5c8f51 100644
- --- a/src/lib/util.cc
- +++ b/src/lib/util.cc
- @@ -115 +115 @@ fomus_rat mod_rat(fomus_rat x, fomus_rat y) {
- - fomus_int m = boost::math::lcm(x.den, y.den);
- + fomus_int m = boost::integer::lcm(x.den, y.den);
- diff --git a/src/lib/vars.cc b/src/lib/vars.cc
- index 7147cee..c98e5f7 100644
- --- a/src/lib/vars.cc
- +++ b/src/lib/vars.cc
- @@ -100 +100 @@ namespace fomus {
- - for (globpercsvarvect_constit i(next(map.begin())); i != map.end(); ++i) {
- + for (globpercsvarvect_constit i(std::next(map.begin())); i != map.end(); ++i) {
- @@ -133 +133 @@ namespace fomus {
- - for (globinstsvarvect_constit i(next(map.begin())); i != map.end(); ++i) {
- + for (globinstsvarvect_constit i(std::next(map.begin())); i != map.end(); ++i) {
- @@ -325 +325 @@ namespace fomus {
- - el.insert(listelmap::value_type(i->first, x.release()));
- + el.insert(listelmap::value_type(i->first, listelshptr(x.release())));
- @@ -366 +366 @@ namespace fomus {
- - el.insert(listelmap::value_type(i->first, x = new listelvect));
- + el.insert(listelmap::value_type(i->first, listelshptr(x = new listelvect)));
- @@ -376,2 +376,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("cmaj", new listelvect(v)));
- - el.insert(listelmap::value_type("amin", new listelvect(v)));
- + el.insert(listelmap::value_type("cmaj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("amin", listelshptr(new listelvect(v))));
- @@ -379,2 +379,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("gmaj", new listelvect(v)));
- - el.insert(listelmap::value_type("emin", new listelvect(v)));
- + el.insert(listelmap::value_type("gmaj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("emin", listelshptr(new listelvect(v))));
- @@ -382,2 +382,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("dmaj", new listelvect(v)));
- - el.insert(listelmap::value_type("bmin", new listelvect(v)));
- + el.insert(listelmap::value_type("dmaj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("bmin", listelshptr(new listelvect(v))));
- @@ -385,2 +385,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("amaj", new listelvect(v)));
- - el.insert(listelmap::value_type("f+min", new listelvect(v)));
- + el.insert(listelmap::value_type("amaj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("f+min", listelshptr(new listelvect(v))));
- @@ -388,2 +388,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("emaj", new listelvect(v)));
- - el.insert(listelmap::value_type("c+min", new listelvect(v)));
- + el.insert(listelmap::value_type("emaj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("c+min", listelshptr(new listelvect(v))));
- @@ -391,2 +391,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("bmaj", new listelvect(v)));
- - el.insert(listelmap::value_type("g+min", new listelvect(v)));
- + el.insert(listelmap::value_type("bmaj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("g+min", listelshptr(new listelvect(v))));
- @@ -394,2 +394,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("f+maj", new listelvect(v)));
- - el.insert(listelmap::value_type("d+min", new listelvect(v)));
- + el.insert(listelmap::value_type("f+maj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("d+min", listelshptr(new listelvect(v))));
- @@ -397,2 +397,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("c+maj", new listelvect(v)));
- - el.insert(listelmap::value_type("a+min", new listelvect(v)));
- + el.insert(listelmap::value_type("c+maj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("a+min", listelshptr(new listelvect(v))));
- @@ -400,2 +400,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("fmaj", new listelvect(v)));
- - el.insert(listelmap::value_type("dmin", new listelvect(v)));
- + el.insert(listelmap::value_type("fmaj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("dmin", listelshptr(new listelvect(v))));
- @@ -403,2 +403,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("b-maj", new listelvect(v)));
- - el.insert(listelmap::value_type("gmin", new listelvect(v)));
- + el.insert(listelmap::value_type("b-maj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("gmin", listelshptr(new listelvect(v))));
- @@ -406,2 +406,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("e-maj", new listelvect(v)));
- - el.insert(listelmap::value_type("cmin", new listelvect(v)));
- + el.insert(listelmap::value_type("e-maj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("cmin", listelshptr(new listelvect(v))));
- @@ -409,2 +409,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("a-maj", new listelvect(v)));
- - el.insert(listelmap::value_type("fmin", new listelvect(v)));
- + el.insert(listelmap::value_type("a-maj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("fmin", listelshptr(new listelvect(v))));
- @@ -412,2 +412,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("d-maj", new listelvect(v)));
- - el.insert(listelmap::value_type("b-min", new listelvect(v)));
- + el.insert(listelmap::value_type("d-maj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("b-min", listelshptr(new listelvect(v))));
- @@ -415,2 +415,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("g-maj", new listelvect(v)));
- - el.insert(listelmap::value_type("e-min", new listelvect(v)));
- + el.insert(listelmap::value_type("g-maj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("e-min", listelshptr(new listelvect(v))));
- @@ -418,2 +418,2 @@ namespace fomus {
- - el.insert(listelmap::value_type("c-maj", new listelvect(v)));
- - el.insert(listelmap::value_type("a-min", new listelvect(v)));
- + el.insert(listelmap::value_type("c-maj", listelshptr(new listelvect(v))));
- + el.insert(listelmap::value_type("a-min", listelshptr(new listelvect(v))));
- @@ -461 +461 @@ namespace fomus {
- - rat i(miv.isnull() ? std::numeric_limits<fint>::min() + 1 : numtorat(miv));
- + rat i2(miv.isnull() ? std::numeric_limits<fint>::min() + 1 : numtorat(miv));
- @@ -463 +463 @@ namespace fomus {
- - user.push_back(new userkeysigent(m, a, i, o));
- + user.push_back(new userkeysigent(m, a, i2, o));
- @@ -466 +466 @@ namespace fomus {
- - if (i.numerator() == std::numeric_limits<fint>::min() + 1) i = 0; // must have at least these two things
- + if (i2.numerator() == std::numeric_limits<fint>::min() + 1) i2 = 0; // must have at least these two things
- @@ -471 +471 @@ namespace fomus {
- - sig[todiatonic(x0.numerator())] = std::pair<rat, rat>(a, i);
- + sig[todiatonic(x0.numerator())] = std::pair<rat, rat>(a, i2);
- @@ -474 +474 @@ namespace fomus {
- - for (int x = todiatonic(m.numerator()) % 7; x < 75; x += 7) sig[x] = std::pair<rat, rat>(a, i);
- + for (int x = todiatonic(m.numerator()) % 7; x < 75; x += 7) sig[x] = std::pair<rat, rat>(a, i2);
- diff --git a/src/lib/vars.h b/src/lib/vars.h
- index 31938f9..64beba4 100644
- --- a/src/lib/vars.h
- +++ b/src/lib/vars.h
- @@ -459 +459,2 @@ namespace fomus {
- - s << std::fixed << std::setprecision(3) << val;
- + s.setf(std::ios_base::fixed, std::ios_base::floatfield);
- + s << std::setprecision(3) << val;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement