Commit 81c8d446 authored by Millian Poquet's avatar Millian Poquet
Browse files

[code] codacy: pass variables by reference

parent a5fd03ac
...@@ -330,7 +330,7 @@ Job * Job::from_json(const std::string & json_str, ...@@ -330,7 +330,7 @@ Job * Job::from_json(const std::string & json_str,
return Job::from_json(doc, workload, error_prefix); return Job::from_json(doc, workload, error_prefix);
} }
string job_state_to_string(JobState state) string job_state_to_string(const JobState & state)
{ {
string job_state("UNKNOWN"); string job_state("UNKNOWN");
...@@ -361,7 +361,7 @@ string job_state_to_string(JobState state) ...@@ -361,7 +361,7 @@ string job_state_to_string(JobState state)
return job_state; return job_state;
} }
JobState job_state_from_string(std::string state) JobState job_state_from_string(const std::string & state)
{ {
JobState new_state; JobState new_state;
......
...@@ -223,11 +223,11 @@ private: ...@@ -223,11 +223,11 @@ private:
* @param[in] state The JobState * @param[in] state The JobState
* @return A std::string corresponding to a given JobState * @return A std::string corresponding to a given JobState
*/ */
std::string job_state_to_string(JobState state); std::string job_state_to_string(const JobState & state);
/** /**
* @brief Returns a JobState corresponding to a given std::string * @brief Returns a JobState corresponding to a given std::string
* @param[in] state The std::string * @param[in] state The std::string
* @return A JobState corresponding to a given std::string * @return A JobState corresponding to a given std::string
*/ */
JobState job_state_from_string(std::string state); JobState job_state_from_string(const std::string & state);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment