Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ifsmirnov committed Mar 15, 2017
1 parent 11a3bbb commit d337ce6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
6 changes: 0 additions & 6 deletions geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,6 @@ std::ostream& operator<<(std::ostream& out, const TPoint<T>& t) {
return out << t.x << " " << t.y;
}

template<typename T>
JNGEN_DECLARE_SIMPLE_PRINTER(TPoint<T>, 2) {
(void)mod;
out << t;
}

// TODO: make polygon a class to support, e.g., shifting by a point
template<typename T>
using TPolygon = GenericArray<TPoint<T>>;
Expand Down
13 changes: 6 additions & 7 deletions jngen.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint32_t> seed;
for (int i = 1; i < argc; ++i) {
int startPosition = seed.size();
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1767,12 +1772,6 @@ std::ostream& operator<<(std::ostream& out, const TPoint<T>& t) {
return out << t.x << " " << t.y;
}

template<typename T>
JNGEN_DECLARE_SIMPLE_PRINTER(TPoint<T>, 2) {
(void)mod;
out << t;
}

// TODO: make polygon a class to support, e.g., shifting by a point
template<typename T>
using TPolygon = GenericArray<TPoint<T>>;
Expand Down
3 changes: 3 additions & 0 deletions printers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
4 changes: 3 additions & 1 deletion random.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint32_t> seed;
for (int i = 1; i < argc; ++i) {
int startPosition = seed.size();
Expand Down

0 comments on commit d337ce6

Please sign in to comment.