Commit c9c432d2 authored by Mathieu Valois's avatar Mathieu Valois
Browse files

read-only parameters

parent f03c1934
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ public:
	 * @brief Initialise the name of the database
	 * @param name: name of the file
	 */
	void setFilename(std::string name);
	void setFilename(const std::string& name);


	/**
@@ -145,7 +145,7 @@ public:
	 * some interesting passwords
	 * @param reg: regular expression
	 */
	void setRegex(std::string reg);
	void setRegex(const std::string& reg);

	/**
	 * @brief Useful to know if the database uses the format withcount
@@ -184,7 +184,7 @@ public:
	 * @brief Where to write masks
	 * @param outfile: the file where to write masks
	 */
	void setOutfile(std::string outfile);
	void setOutfile(const std::string& outfile);

	/**
	 * @brief enable debugging
+3 −3
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
using namespace std;


void Statsgen::setFilename(std::string name) {
void Statsgen::setFilename(const std::string& name) {
	if (name == "-"){
		is_stdin = true;
		warn("reading from stdin enabled, loading the whole list in memory");
@@ -46,7 +46,7 @@ void Statsgen::setTop(int val) {
}


void Statsgen::setRegex(string expr) {
void Statsgen::setRegex(const string& expr) {
	string tmp(expr.length(),' ');
	copy(expr.begin(), expr.end(), tmp.begin());

@@ -80,7 +80,7 @@ void Statsgen::setNbThread(int nb) {
	}
}

void Statsgen::setOutfile(string outfile){
void Statsgen::setOutfile(const string& outfile){
	outfile_name = outfile;
}