Skip to content

Commit

Permalink
Solve the bug of std::move, refer to #6787
Browse files Browse the repository at this point in the history
  • Loading branch information
jiapei100 committed May 9, 2024
1 parent 008cfb7 commit 95d431c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cpp/open3d/visualization/rendering/RendererHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ struct REHandle : public REHandle_abstract {
id = REHandle_abstract::kBadId + 1;
}

return std::move(REHandle(id));
return REHandle(id);
}

static REHandle Concretize(const REHandle_abstract& abstract) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ using ResourcesContainer =
template <class ResourceType>
std::shared_ptr<ResourceType> MakeShared(ResourceType* pointer,
filament::Engine& engine) {
return std::move(std::shared_ptr<ResourceType>(
pointer, [&engine](ResourceType* p) { engine.destroy(p); }));
return std::shared_ptr<ResourceType>(
pointer, [&engine](ResourceType* p) { engine.destroy(p); });
}

template <class ResourceType>
Expand All @@ -98,7 +98,7 @@ Handle RegisterResource(filament::Engine& engine,
}

auto new_handle = Handle::Next();
container[new_handle] = std::move(BoxResource(resource, engine));
container[new_handle] = BoxResource(resource, engine);
return new_handle;
}

Expand Down

0 comments on commit 95d431c

Please sign in to comment.