Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
batsim
batsim
Commits
81c8d446
Commit
81c8d446
authored
Sep 11, 2017
by
Millian Poquet
Browse files
[code] codacy: pass variables by reference
parent
a5fd03ac
Changes
2
Show whitespace changes
Inline
Side-by-side
src/jobs.cpp
View file @
81c8d446
...
...
@@ -330,7 +330,7 @@ Job * Job::from_json(const std::string & json_str,
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"
);
...
...
@@ -361,7 +361,7 @@ string job_state_to_string(JobState state)
return
job_state
;
}
JobState
job_state_from_string
(
std
::
string
state
)
JobState
job_state_from_string
(
const
std
::
string
&
state
)
{
JobState
new_state
;
...
...
src/jobs.hpp
View file @
81c8d446
...
...
@@ -223,11 +223,11 @@ private:
* @param[in] state The 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
* @param[in] state The 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
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment