Skip to content

Commit 203af69

Browse files
committed
simplify GetStringParamName implementation in performance module
1 parent 85390be commit 203af69

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

modules/performance/include/performance.hpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,13 @@ struct PerfResults {
6767
* @return String name corresponding to the enum.
6868
*/
6969
inline std::string GetStringParamName(PerfResults::TypeOfRunning type_of_running) {
70-
switch (type_of_running) {
71-
case PerfResults::kTaskRun:
72-
return "task_run";
73-
case PerfResults::kPipeline:
74-
return "pipeline";
75-
default:
76-
return "none";
70+
if (type_of_running == PerfResults::kTaskRun) {
71+
return "task_run";
7772
}
73+
if (type_of_running == PerfResults::kPipeline) {
74+
return "pipeline";
75+
}
76+
return "none";
7877
}
7978

8079
/**

0 commit comments

Comments
 (0)