Commit 5e0e5b92 authored by Mathieu Valois's avatar Mathieu Valois
Browse files

remove space in occurence for -o, sort masks by occurence

parent be91287e
Loading
Loading
Loading
Loading
+6 −2
Changes for Statsgen/src/statsgen.cpp: 6 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -264,9 +264,13 @@ void Statsgen::print_stats() {
	showMap(stats_advancedmasks, top, total_counter, hiderare, count);

	if (outfile_name != ""){
		locale::global(locale("C"));
		wofstream outfile_stream(outfile_name);
		for(auto it=stats_advancedmasks.begin();it!=stats_advancedmasks.end();it++){
			outfile_stream << it->first << "," << it->second << endl;
		multimap<double, wstring> reverse = flip_map<wstring>(stats_advancedmasks);
		for(auto it=reverse.end();it!=reverse.begin();it--){
			if (it == reverse.end()) continue;
			if(it->second == L"othermasks") continue;
			outfile_stream << it->second << "," << it->first << endl;
		}
		outfile_stream.close();
	}