Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ifsmirnov committed Apr 8, 2017
1 parent ecf7e2b commit d3c3e6e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions jngen.h
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,6 @@ int Random::wnext(int n, int w) {
return smallWnext<int>(w, n);
} else {
double t = realWnext(w);
std::cerr << "t = " << t << std::endl;
return n * t;
}
}
Expand Down Expand Up @@ -1935,13 +1934,12 @@ JNGEN_DECLARE_PRINTER(
JNGEN_HAS_OSTREAM() && JNGEN_HAS_FUNCTION(Plus), 11)
{
if (std::is_integral<T>::value) {
out << t + mod.addition;
out << T(t + mod.addition);
} else {
out << t;
}
}


JNGEN_DECLARE_PRINTER(detail::VectorDepth<T>::value == 1, 3)
{
if (mod.printN) {
Expand Down Expand Up @@ -3885,7 +3883,7 @@ class VariantArray : public GenericArray<Variant<Args...>> {

namespace jngen {

#define JNGEN_DEFAULT_WEIGHT_TYPES int, double, std::string, std::pair<int, int>
#define JNGEN_DEFAULT_WEIGHT_TYPES int, double, std::string, char, std::pair<int, int>

#if defined(JNGEN_EXTRA_WEIGHT_TYPES)
#define JNGEN_WEIGHT_TYPES JNGEN_DEFAULT_WEIGHT_TYPES , JNGEN_EXTRA_WEIGHT_TYPES
Expand Down
3 changes: 1 addition & 2 deletions printers.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,12 @@ JNGEN_DECLARE_PRINTER(
JNGEN_HAS_OSTREAM() && JNGEN_HAS_FUNCTION(Plus), 11)
{
if (std::is_integral<T>::value) {
out << t + mod.addition;
out << T(t + mod.addition);
} else {
out << t;
}
}


JNGEN_DECLARE_PRINTER(detail::VectorDepth<T>::value == 1, 3)
{
if (mod.printN) {
Expand Down
1 change: 0 additions & 1 deletion random_inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ int Random::wnext(int n, int w) {
return smallWnext<int>(w, n);
} else {
double t = realWnext(w);
std::cerr << "t = " << t << std::endl;
return n * t;
}
}
Expand Down
2 changes: 1 addition & 1 deletion weight.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace jngen {

#define JNGEN_DEFAULT_WEIGHT_TYPES int, double, std::string, std::pair<int, int>
#define JNGEN_DEFAULT_WEIGHT_TYPES int, double, std::string, char, std::pair<int, int>

#if defined(JNGEN_EXTRA_WEIGHT_TYPES)
#define JNGEN_WEIGHT_TYPES JNGEN_DEFAULT_WEIGHT_TYPES , JNGEN_EXTRA_WEIGHT_TYPES
Expand Down

0 comments on commit d3c3e6e

Please sign in to comment.