From d337ce64209c33651f9670524204984567742fcf Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Wed, 15 Mar 2017 22:18:22 +0300 Subject: [PATCH] small fixes --- geometry.h | 6 ------ jngen.h | 13 ++++++------- printers.h | 3 +++ random.h | 4 +++- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/geometry.h b/geometry.h index 0ad99f1..fdc8591 100644 --- a/geometry.h +++ b/geometry.h @@ -139,12 +139,6 @@ std::ostream& operator<<(std::ostream& out, const TPoint& t) { return out << t.x << " " << t.y; } -template -JNGEN_DECLARE_SIMPLE_PRINTER(TPoint, 2) { - (void)mod; - out << t; -} - // TODO: make polygon a class to support, e.g., shifting by a point template using TPolygon = GenericArray>; diff --git a/jngen.h b/jngen.h index 86a099b..573f4e5 100644 --- a/jngen.h +++ b/jngen.h @@ -645,7 +645,9 @@ using jngen::Random; using jngen::rnd; using jngen::opair; -void registerGen(int argc, char *argv[]) { +void registerGen(int argc, char *argv[], int version = 1) { + (void)version; // unused, only for testlib.h compatibility + std::vector seed; for (int i = 1; i < argc; ++i) { int startPosition = seed.size(); @@ -1015,6 +1017,9 @@ auto operator<<(std::ostream& out, const T& t) } // namespace namespace_for_fake_operator_ltlt +// Calling this operator inside jngen namespace doesn't work without this line. +using namespace jngen::namespace_for_fake_operator_ltlt; + } // namespace jngen using namespace jngen::namespace_for_fake_operator_ltlt; @@ -1767,12 +1772,6 @@ std::ostream& operator<<(std::ostream& out, const TPoint& t) { return out << t.x << " " << t.y; } -template -JNGEN_DECLARE_SIMPLE_PRINTER(TPoint, 2) { - (void)mod; - out << t; -} - // TODO: make polygon a class to support, e.g., shifting by a point template using TPolygon = GenericArray>; diff --git a/printers.h b/printers.h index 1d3a200..138e6b0 100644 --- a/printers.h +++ b/printers.h @@ -181,6 +181,9 @@ auto operator<<(std::ostream& out, const T& t) } // namespace namespace_for_fake_operator_ltlt +// Calling this operator inside jngen namespace doesn't work without this line. +using namespace jngen::namespace_for_fake_operator_ltlt; + } // namespace jngen using namespace jngen::namespace_for_fake_operator_ltlt; diff --git a/random.h b/random.h index 45d6edf..eaca4f2 100644 --- a/random.h +++ b/random.h @@ -233,7 +233,9 @@ using jngen::Random; using jngen::rnd; using jngen::opair; -void registerGen(int argc, char *argv[]) { +void registerGen(int argc, char *argv[], int version = 1) { + (void)version; // unused, only for testlib.h compatibility + std::vector seed; for (int i = 1; i < argc; ++i) { int startPosition = seed.size();