diff --git a/ntcore/src/main/native/include/networktables/NetworkTableValue.h b/ntcore/src/main/native/include/networktables/NetworkTableValue.h index a26f06636e..40881126d8 100644 --- a/ntcore/src/main/native/include/networktables/NetworkTableValue.h +++ b/ntcore/src/main/native/include/networktables/NetworkTableValue.h @@ -288,7 +288,7 @@ class Value final { typename std::enable_if::value>::type> static std::shared_ptr MakeString(T&& value, uint64_t time = 0) { auto val = std::make_shared(NT_STRING, time, private_init()); - val->m_string = std::move(value); + val->m_string = std::forward(value); val->m_val.data.v_string.str = const_cast(val->m_string.c_str()); val->m_val.data.v_string.len = val->m_string.size(); return val; @@ -322,7 +322,7 @@ class Value final { typename std::enable_if::value>::type> static std::shared_ptr MakeRaw(T&& value, uint64_t time = 0) { auto val = std::make_shared(NT_RAW, time, private_init()); - val->m_string = std::move(value); + val->m_string = std::forward(value); val->m_val.data.v_raw.str = const_cast(val->m_string.c_str()); val->m_val.data.v_raw.len = val->m_string.size(); return val; @@ -355,7 +355,7 @@ class Value final { template static std::shared_ptr MakeRpc(T&& value, uint64_t time = 0) { auto val = std::make_shared(NT_RPC, time, private_init()); - val->m_string = std::move(value); + val->m_string = std::forward(value); val->m_val.data.v_raw.str = const_cast(val->m_string.c_str()); val->m_val.data.v_raw.len = val->m_string.size(); return val;