Skip to content

Commit

Permalink
Call to implicitly deleted constructor
Browse files Browse the repository at this point in the history
[build error](https://www.icloud.com/iclouddrive/083j4A7FWBweG3wFmAnHzDyfQ#call_to_implicitly_deleted_constructor) seems to be caused by the double declaration of primitive AccessibilityUnit:
  • Loading branch information
fabOnReact committed Nov 14, 2022
1 parent 2fed660 commit 252e6f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void TextAttributes::apply(TextAttributes textAttributes) {
accessibilityRole = textAttributes.accessibilityRole.has_value()
? textAttributes.accessibilityRole
: accessibilityRole;
accessibilityUnit = !textAttributes.accessibilityUnit.empty() ? textAttributes.accessibilityUnit
accessibilityUnit = !textAttributes.accessibilityUnit.has_value() ? textAttributes.accessibilityUnit
: accessibilityUnit;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class TextAttributes : public DebugStringConvertible {
// construction.
std::optional<LayoutDirection> layoutDirection{};
std::optional<AccessibilityRole> accessibilityRole{};
std::string accessibilityUnit{};
AccessibilityUnit accessibilityUnit{};

#pragma mark - Operations

Expand Down
4 changes: 4 additions & 0 deletions ReactCommon/react/renderer/attributedstring/primitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ enum class AccessibilityRole {
Toolbar,
};

struct AccessibilityUnit {
std::string hours{""};
};

enum class TextTransform {
None,
Uppercase,
Expand Down

1 comment on commit 252e6f4

@fabOnReact
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.