@@ -25,7 +25,7 @@ class ScopedRegion
2525 , m_id(detail::make_null_id())
2626 , m_active(true )
2727 {
28- __itt_string_handle* h = detail::create_string_handle ( std::string ( name). c_str () );
28+ __itt_string_handle* h = detail::get_or_create_string_handle ( name);
2929 __itt_region_begin (m_domain, m_id, detail::make_null_id (), h);
3030 }
3131
@@ -35,7 +35,7 @@ class ScopedRegion
3535 , m_id(id)
3636 , m_active(true )
3737 {
38- __itt_string_handle* h = detail::create_string_handle ( std::string ( name). c_str () );
38+ __itt_string_handle* h = detail::get_or_create_string_handle ( name);
3939 __itt_region_begin (m_domain, m_id, parentid, h);
4040 }
4141
@@ -45,7 +45,7 @@ class ScopedRegion
4545 , m_id(detail::make_null_id())
4646 , m_active(true )
4747 {
48- __itt_string_handle* h = detail::create_string_handle ( std::wstring ( name). c_str () );
48+ __itt_string_handle* h = detail::get_or_create_string_handle ( name);
4949 __itt_region_begin (m_domain, m_id, detail::make_null_id (), h);
5050 }
5151
@@ -55,7 +55,7 @@ class ScopedRegion
5555 , m_id(id)
5656 , m_active(true )
5757 {
58- __itt_string_handle* h = detail::create_string_handle ( std::wstring ( name). c_str () );
58+ __itt_string_handle* h = detail::get_or_create_string_handle ( name);
5959 __itt_region_begin (m_domain, m_id, parentid, h);
6060 }
6161#endif
0 commit comments