From d3c3e6e792030977e95c4d46dc5ab0facf30320b Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Sat, 8 Apr 2017 07:30:20 +0200 Subject: [PATCH] small fixes --- jngen.h | 6 ++---- printers.h | 3 +-- random_inl.h | 1 - weight.h | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/jngen.h b/jngen.h index 702ea8f..6100bd8 100644 --- a/jngen.h +++ b/jngen.h @@ -1578,7 +1578,6 @@ int Random::wnext(int n, int w) { return smallWnext(w, n); } else { double t = realWnext(w); - std::cerr << "t = " << t << std::endl; return n * t; } } @@ -1935,13 +1934,12 @@ JNGEN_DECLARE_PRINTER( JNGEN_HAS_OSTREAM() && JNGEN_HAS_FUNCTION(Plus), 11) { if (std::is_integral::value) { - out << t + mod.addition; + out << T(t + mod.addition); } else { out << t; } } - JNGEN_DECLARE_PRINTER(detail::VectorDepth::value == 1, 3) { if (mod.printN) { @@ -3885,7 +3883,7 @@ class VariantArray : public GenericArray> { namespace jngen { -#define JNGEN_DEFAULT_WEIGHT_TYPES int, double, std::string, std::pair +#define JNGEN_DEFAULT_WEIGHT_TYPES int, double, std::string, char, std::pair #if defined(JNGEN_EXTRA_WEIGHT_TYPES) #define JNGEN_WEIGHT_TYPES JNGEN_DEFAULT_WEIGHT_TYPES , JNGEN_EXTRA_WEIGHT_TYPES diff --git a/printers.h b/printers.h index a8ea641..23db62a 100644 --- a/printers.h +++ b/printers.h @@ -104,13 +104,12 @@ JNGEN_DECLARE_PRINTER( JNGEN_HAS_OSTREAM() && JNGEN_HAS_FUNCTION(Plus), 11) { if (std::is_integral::value) { - out << t + mod.addition; + out << T(t + mod.addition); } else { out << t; } } - JNGEN_DECLARE_PRINTER(detail::VectorDepth::value == 1, 3) { if (mod.printN) { diff --git a/random_inl.h b/random_inl.h index 08d9271..d1b20d4 100644 --- a/random_inl.h +++ b/random_inl.h @@ -10,7 +10,6 @@ int Random::wnext(int n, int w) { return smallWnext(w, n); } else { double t = realWnext(w); - std::cerr << "t = " << t << std::endl; return n * t; } } diff --git a/weight.h b/weight.h index 6a37e16..a3e21aa 100644 --- a/weight.h +++ b/weight.h @@ -8,7 +8,7 @@ namespace jngen { -#define JNGEN_DEFAULT_WEIGHT_TYPES int, double, std::string, std::pair +#define JNGEN_DEFAULT_WEIGHT_TYPES int, double, std::string, char, std::pair #if defined(JNGEN_EXTRA_WEIGHT_TYPES) #define JNGEN_WEIGHT_TYPES JNGEN_DEFAULT_WEIGHT_TYPES , JNGEN_EXTRA_WEIGHT_TYPES