@@ -28,15 +28,15 @@ static compat::RegisterCodeDealloc register_dealloc(on_dealloc);
2828
2929// Used for regions, that have an identifier, aka a code object id. (instrumenter regions and
3030// some decorated regions)
31- void region_begin (std::string_view& function_name, std::string_view& module ,
31+ void region_begin (std::string_view function_name, std::string_view module ,
3232 const std::string& file_name, const std::uint64_t line_number,
3333 compat::PyCodeObject* identifier)
3434{
3535 region_handle& region = regions[identifier];
3636
3737 if (region == uninitialised_region_handle)
3838 {
39- auto & region_name = make_region_name (module , function_name);
39+ const auto region_name = make_region_name (module , function_name);
4040 SCOREP_User_RegionInit (®ion.value , NULL , NULL , region_name.c_str (),
4141 SCOREP_USER_REGION_TYPE_FUNCTION, file_name.c_str (), line_number);
4242
@@ -47,10 +47,10 @@ void region_begin(std::string_view& function_name, std::string_view& module,
4747
4848// Used for regions, that only have a function name, a module, a file and a line number (user
4949// regions)
50- void region_begin (std::string_view& function_name, std::string_view& module ,
50+ void region_begin (std::string_view function_name, std::string_view module ,
5151 const std::string& file_name, const std::uint64_t line_number)
5252{
53- std::string region_name = make_region_name (module , function_name);
53+ const auto region_name = make_region_name (module , function_name);
5454 region_handle& region = user_regions[region_name];
5555
5656 if (region == uninitialised_region_handle)
@@ -65,7 +65,7 @@ void region_begin(std::string_view& function_name, std::string_view& module,
6565
6666// Used for regions, that have an identifier, aka a code object id. (instrumenter regions and
6767// some decorated regions)
68- void region_end (std::string_view& function_name, std::string_view& module ,
68+ void region_end (std::string_view function_name, std::string_view module ,
6969 compat::PyCodeObject* identifier)
7070{
7171 const auto it_region = regions.find (identifier);
@@ -75,15 +75,15 @@ void region_end(std::string_view& function_name, std::string_view& module,
7575 }
7676 else
7777 {
78- std::string region_name = make_region_name (module , function_name);
78+ const auto region_name = make_region_name (module , function_name);
7979 region_end_error_handling (region_name);
8080 }
8181}
8282
8383// Used for regions, that only have a function name, a module (user regions)
84- void region_end (std::string_view& function_name, std::string_view& module )
84+ void region_end (std::string_view function_name, std::string_view module )
8585{
86- std::string region_name = make_region_name (module , function_name);
86+ const auto region_name = make_region_name (module , function_name);
8787 auto it_region = user_regions.find (region_name);
8888 if (it_region != user_regions.end ())
8989 {
0 commit comments