Skip to content

Commit

Permalink
#306: example: clean up manual printf with fmt specifier
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Apr 16, 2019
1 parent 0408a16 commit b5344dc
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions examples/epoch_example.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,15 @@ int main(int argc, char** argv) {
auto const next = epoch::EpochManip::next(rooted);
auto const next_seq = epoch::EpochManip::seq(next);

::fmt::print(
fmt::print(
"rooted epoch={}, is_rooted={}, has_cat={}, is_user={}, get_seq={}, "
"node={}, next={}, next_seq={}, num={}, end={}\n",
rooted, is_rooted, has_category, is_user, get_seq, ep_node, next,
next_seq, epoch::epoch_seq_num_bits, epoch::eEpochLayout::EpochSentinelEnd
);
::fmt::print(
"epoch={}, seq={}\n", rooted, get_seq
);
printf("epoch %" PRIu64 " , %" PRIx64 " : seq %" PRIu64 " , %" PRIx64 "\n", rooted, rooted, get_seq, get_seq);
printf("epoch %" PRIu64 " , %" PRIx64 " : seq %" PRIu64 " , %" PRIx64 "\n", next, next, next_seq, next_seq);
fmt::print("epoch={}, seq={}\n", rooted, get_seq);
fmt::print("epoch {}, {:x} : seq {}, {:x}\n", rooted, rooted, get_seq, get_seq);
fmt::print("epoch {}, {:x} : seq {}, {:x}\n", next, next, next_seq, next_seq);
}

while (!rt->isTerminated()) {
Expand Down

0 comments on commit b5344dc

Please sign in to comment.