Skip to content

Commit

Permalink
Fix example compilaton in debug mode. Fixes #340
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Mar 11, 2021
1 parent e44fb52 commit 39cba4f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/confirm_mutation_counts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ confirm_mutation_counts(poptype &pop,

for (auto &mr : tables.mutations)
{
if (mr.node == fwdpp::ts::TS_NULL_NODE)
if (mr.node == fwdpp::ts::NULL_INDEX)
{
throw std::runtime_error(
"mutation node maps to null node");
Expand Down
4 changes: 2 additions & 2 deletions examples/simplify_tables.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ simplify_tables(poptype &pop, const fwdpp::uint_t generation,
for (auto &s : samples)
{
s = rv.first[s];
assert(s != fwdpp::ts::TS_NULL_NODE);
assert(s != fwdpp::ts::NULL_INDEX);
}
for (auto &s : preserved_nodes)
{
s = rv.first[s];
assert(s != fwdpp::ts::TS_NULL_NODE);
assert(s != fwdpp::ts::NULL_INDEX);
}
if (!preserve_fixations)
{
Expand Down
4 changes: 2 additions & 2 deletions examples/wfevolvets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ simplify_tables_remap_metadata(
for (auto& md : metadata)
{
// Validate output
if (x.first[md.n1] == fwdpp::ts::TS_NULL_NODE
|| x.first[md.n2] == fwdpp::ts::TS_NULL_NODE)
if (x.first[md.n1] == fwdpp::ts::NULL_INDEX
|| x.first[md.n2] == fwdpp::ts::NULL_INDEX)
{
throw fwdpp::ts::tables_error("output node maps to null");
}
Expand Down
8 changes: 4 additions & 4 deletions examples/wfts_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ main(int argc, char **argv)
{
md.n1 = rv.first[md.n1];
md.n2 = rv.first[md.n2];
assert(md.n1 != fwdpp::ts::TS_NULL_NODE);
assert(md.n2 != fwdpp::ts::TS_NULL_NODE);
assert(md.n1 != fwdpp::ts::NULL_INDEX);
assert(md.n2 != fwdpp::ts::NULL_INDEX);
}
}
else
Expand Down Expand Up @@ -268,8 +268,8 @@ main(int argc, char **argv)
{
md.n1 = rv.first[md.n1];
md.n2 = rv.first[md.n2];
assert(md.n1 != fwdpp::ts::TS_NULL_NODE);
assert(md.n2 != fwdpp::ts::TS_NULL_NODE);
assert(md.n1 != fwdpp::ts::NULL_INDEX);
assert(md.n2 != fwdpp::ts::NULL_INDEX);
}
}
// This is an infinite-sites simulation, so we can do some
Expand Down

0 comments on commit 39cba4f

Please sign in to comment.