Skip to content

Commit

Permalink
let Pointer be nothrow-move-constructible (#47331)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: facebook/react-native#47331

Reviewed By: Gownta

Differential Revision: D65271354

fbshipit-source-id: cd3ff9db94f2ad332afd68dae438c404f8807f70
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Nov 5, 2024
1 parent ba257f6 commit 54e428c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion API/jsi/jsi/jsi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ std::u16string Runtime::utf16(const String& str) {
return convertUTF8ToUTF16(utf8Str);
}

Pointer& Pointer::operator=(Pointer&& other) {
Pointer& Pointer::operator=(Pointer&& other) noexcept {
if (ptr_) {
ptr_->invalidate();
}
Expand Down
4 changes: 2 additions & 2 deletions API/jsi/jsi/jsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ class JSI_EXPORT Runtime {
// Base class for pointer-storing types.
class JSI_EXPORT Pointer {
protected:
explicit Pointer(Pointer&& other) : ptr_(other.ptr_) {
explicit Pointer(Pointer&& other) noexcept : ptr_(other.ptr_) {
other.ptr_ = nullptr;
}

Expand All @@ -428,7 +428,7 @@ class JSI_EXPORT Pointer {
}
}

Pointer& operator=(Pointer&& other);
Pointer& operator=(Pointer&& other) noexcept;

friend class Runtime;
friend class Value;
Expand Down

0 comments on commit 54e428c

Please sign in to comment.