diff --git a/tools/compare.cpp b/tools/compare.cpp index a9ab558..ca501b6 100644 --- a/tools/compare.cpp +++ b/tools/compare.cpp @@ -53,7 +53,9 @@ namespace emory { struct side { IdT id; chunk data; - } src, dst; + }; + + side src, dst; struct src_equality { @@ -98,6 +100,16 @@ namespace emory { }; + template + std::ostream& + operator<< (std::ostream &os, match const &val) + { + return os << "{ src: { id: " << val.src.id << ", data: " << val.src.data << " }" + << ", dst: { id: " << val.dst.id << ", data: " << val.dst.data << " }" + << " }"; + } + + std::vector> common (map const &a, map const &b); } @@ -246,7 +258,7 @@ int main (int argc, char const **argv) std::size_t matching = 0; std::vector source_bytes (argc - ARGS_SOURCE, 0); for (auto const &i: found) { - std::cout << i.dst.data << '\n'; + std::cout << i << '\n'; auto const size = i.dst.data.offset.second - i.dst.data.offset.first; matching += size; source_bytes[i.src.id - ARGS_SOURCE] += size;