Skip to content

Commit

Permalink
fix remaining warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jwaldrop107 committed May 13, 2024
1 parent d969894 commit ccb7fcf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/pluginplay/fields/module_input.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
namespace pluginplay {

inline ModuleInput& ModuleInput::operator=(const ModuleInput& rhs) {
return *this = std::move(ModuleInput(rhs));
return *this = ModuleInput(rhs);
}

template<typename T>
Expand Down Expand Up @@ -118,7 +118,7 @@ auto& ModuleInput::change(T&& new_value) {
// By convention we store strings as std::string, so we have to catch when
// the user passed a C-string in
if constexpr(detail_::IsCString<T>::value) {
change_(std::move(wrap_value_(std::string(new_value))));
change_(wrap_value_(std::string(new_value)));
} else {
change_(std::move(wrap_value_(std::forward<T>(new_value))));
}
Expand Down
4 changes: 2 additions & 2 deletions include/pluginplay/fields/module_result.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace pluginplay {
//------------------------------Implementations---------------------------------

inline ModuleResult& ModuleResult::operator=(const ModuleResult& rhs) {
return *this = std::move(ModuleResult(rhs));
return *this = ModuleResult(rhs);
}

template<typename T>
Expand All @@ -44,7 +44,7 @@ void ModuleResult::change(T&& new_value) {
if constexpr(is_shared_any)
change_(new_value);
else if constexpr(detail_::IsCString<T>::value)
change_(std::move(wrap_value_(std::string(new_value))));
change_(wrap_value_(std::string(new_value)));
else
change_(std::move(wrap_value_(std::forward<T>(new_value))));
}
Expand Down
2 changes: 1 addition & 1 deletion include/pluginplay/submodule_request.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ class SubmoduleRequest {

inline SubmoduleRequest& SubmoduleRequest::operator=(
const SubmoduleRequest& rhs) {
return *this = std::move(SubmoduleRequest(rhs));
return *this = SubmoduleRequest(rhs);
}

template<typename T>
Expand Down
2 changes: 1 addition & 1 deletion src/pluginplay/detail_/module_manager_pimpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ struct ModuleManagerPIMPL {
*/
void copy_module(const type::key& old_key, type::key new_key) {
assert_unique_key_(new_key);
Module mod = std::move(m_modules.at(old_key)->unlocked_copy());
Module mod = m_modules.at(old_key)->unlocked_copy();
auto ptr = std::make_shared<Module>(std::move(mod));
ptr->set_name(new_key);
m_modules.emplace(std::move(new_key), ptr);
Expand Down

0 comments on commit ccb7fcf

Please sign in to comment.