Skip to content

Commit e1e2960

Browse files
committed
refactor Task module: replace constexpr with const for kTaskTypeMappings to improve consistency and align with mutable array requirements
1 parent d8d96f8 commit e1e2960

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/core/task/include/task.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ enum TypeOfTask : uint8_t {
4444
using TaskMapping = std::pair<TypeOfTask, std::string>;
4545
using TaskMappingArray = std::array<TaskMapping, 6>;
4646

47-
constexpr TaskMappingArray kTaskTypeMappings = {{{TypeOfTask::kALL, "all"},
48-
{TypeOfTask::kMPI, "mpi"},
49-
{TypeOfTask::kOMP, "omp"},
50-
{TypeOfTask::kSEQ, "seq"},
51-
{TypeOfTask::kSTL, "stl"},
52-
{TypeOfTask::kTBB, "tbb"}}};
47+
const TaskMappingArray kTaskTypeMappings = {{{TypeOfTask::kALL, "all"},
48+
{TypeOfTask::kMPI, "mpi"},
49+
{TypeOfTask::kOMP, "omp"},
50+
{TypeOfTask::kSEQ, "seq"},
51+
{TypeOfTask::kSTL, "stl"},
52+
{TypeOfTask::kTBB, "tbb"}}};
5353

5454
inline std::string TypeOfTaskToString(TypeOfTask type) {
5555
for (const auto &[key, value] : kTaskTypeMappings) {

0 commit comments

Comments
 (0)