From c87d3baea33ced4fe224b94ae5f1ab1a39ebc3e9 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sun, 11 Sep 2022 20:01:27 -0400 Subject: Stop writting result to a file as it's in the database already. --- tests/testdrive_sqlite.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'tests') diff --git a/tests/testdrive_sqlite.cpp b/tests/testdrive_sqlite.cpp index 01a76ad..42f176e 100644 --- a/tests/testdrive_sqlite.cpp +++ b/tests/testdrive_sqlite.cpp @@ -263,7 +263,6 @@ int main(int argc,char** argv) puts("computing signature vectors..."); run(); - FILE *outf = fopen("result", "wb"); std::vector dupes = sdb->dupe_pairs(); for (auto &p : dupes) @@ -273,18 +272,7 @@ int main(int argc,char** argv) #else printf("%s %s %f\n", files[p.id1].c_str(), files[p.id2].c_str(), p.distance); #endif - int t; - double ts=0; - t = (int)files[p.id1].native().length(); - fwrite(&t, sizeof(int), 1, outf); - fwrite(files[p.id1].c_str(), sizeof(fs::path::value_type), t, outf); - t = (int)files[p.id2].native().length(); - fwrite(&t, sizeof(int), 1, outf); - fwrite(files[p.id2].c_str(), sizeof(fs::path::value_type), t, outf); - ts = p.distance; - fwrite(&ts, sizeof(double), 1, outf); } - fclose(outf); sdb->to_db_file("test.sigdb"); delete sdb; return 0; -- cgit v1.2.3