Skip to content

Commit db6a8e3

Browse files
committed
Make strings not const so move ctor is called automatically
1 parent 4c465e8 commit db6a8e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sycl/source/detail/config.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -647,12 +647,12 @@ template <> class SYCLConfig<SYCL_JIT_AMDGCN_PTX_TARGET_CPU> {
647647

648648
public:
649649
static std::string get() {
650-
const std::string DefaultValue{""};
650+
std::string DefaultValue{""};
651651

652652
const char *ValStr = getCachedValue();
653653

654654
if (!ValStr)
655-
return std::move(DefaultValue);
655+
return DefaultValue;
656656

657657
return std::string{ValStr};
658658
}
@@ -675,7 +675,7 @@ template <> class SYCLConfig<SYCL_JIT_AMDGCN_PTX_TARGET_FEATURES> {
675675

676676
public:
677677
static std::string get() {
678-
const std::string DefaultValue{""};
678+
std::string DefaultValue{""};
679679

680680
const char *ValStr = getCachedValue();
681681

0 commit comments

Comments
 (0)